--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/quarkus-dev/44a67e90-3a90-4882-a1fe-188f46bcb668n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/quarkus-dev/CANghgrSspvhqh1xgQbpHQfEge8mcw-D_mRV6RLAjpL_oCg134w%40mail.gmail.com.
<shutdown.png>
It all started with a simple int priority that one could pass with the shutdown task to add it to a prioritised queue. However, as Yoann suggested that if we miss something now, it may be problematic to change the priority ranges later, I've changed things a bit so that instead of passing a simple int, there's a `Priority` class expected, and a set of factory methods are available to get the task into a particular segment of the shutdown timeline.
This shutdown priority is not explicitly tied to the order in which the extensions are "started". However, it is implicitly tied, as shutdown tasks are added by extensions during startup. Using the default priority puts them in an order such that they should shut down in reverse compared to their start.If we discover any other significant points in this "timeline", we can add them to that factory interface and base other priorities on it.Factory methods take +/- values, where a negative value means add the task to the "end-of-the-priority-range minus value-passed-to-factory-method", so that it would be easier to add the tasks either at the end or start of the priority range.
As this would affect more than one extension, what are your thoughts on this?
[1] https://github.com/quarkusio/quarkus/issues/34547
[2] https://github.com/quarkusio/quarkus/pull/46357--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/quarkus-dev/44a67e90-3a90-4882-a1fe-188f46bcb668n%40googlegroups.com.
--- DML • he/him--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/quarkus-dev/CANghgrSspvhqh1xgQbpHQfEge8mcw-D_mRV6RLAjpL_oCg134w%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/quarkus-dev/CAEqagpqQ_Ps98DQ0Sk_bWDhE5TeMRWPZ707KVgVCWnQaUtYXWg%40mail.gmail.com.
If I remember correctly though, the whole of CDI is one big shutdown task, relative order of shutdown between beans being completely undefined...
To view this discussion visit https://groups.google.com/d/msgid/quarkus-dev/CAEqagpqQ_Ps98DQ0Sk_bWDhE5TeMRWPZ707KVgVCWnQaUtYXWg%40mail.gmail.com.
You received this message because you are subscribed to a topic in the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/quarkus-dev/CMq7i4EZMXY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to quarkus-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/quarkus-dev/CALbocOmx%2BCrioKgoGyaXJXqQEC8d%3DDzY6TTJkPT49nqy5wmDoQ%40mail.gmail.com.
shutdownListenerBuildItemBuildProducer.produce(new ShutdownListenerBuildItem(
recorder.initializeLogging(logRuntimeConfig, logBuildTimeConfig, discoveredLogComponents,
categoryMinLevelDefaults.content, alwaysEnableLogStream,
streamingDevUiLogHandler, handlers, namedHandlers,
possibleConsoleFormatters, possibleFileFormatters, possibleSyslogFormatters,
possibleSocketFormatters,
possibleSupplier, launchModeBuildItem.getLaunchMode(), true)));
When I’m debugging something, I just skip over that kind of line, because I’m not worried about what’s happening at shutdown, right?Nope, wrong. I just missed a big piece of startup logic.To me, a pattern like this would be much clearer, because it doesn’t bury the ‘real’ action inside shutdown logic.
recorder.initializeLogging(logRuntimeConfig, logBuildTimeConfig, discoveredLogComponents,
categoryMinLevelDefaults.content, alwaysEnableLogStream,
streamingDevUiLogHandler, handlers, namedHandlers,
possibleConsoleFormatters, possibleFileFormatters, possibleSyslogFormatters,
possibleSocketFormatters,
possibleSupplier, launchModeBuildItem.getLaunchMode(), true, shutdownListenerBuildItemBuildProducer)));
To view this discussion visit https://groups.google.com/d/msgid/quarkus-dev/CACYzyevjTGDihdFBrmF60K%3DmxpJUs%2BCKQVZfn%2BaVejXueCmHwg%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/quarkus-dev/CA3CF71E-DC38-48AF-9E55-A3D00C14126D%40redhat.com.