-
I have a function like so void onShutdown(final @Observes ShutdownEvent ev) {
// cleanly close some communication
} And I have a scheduler that updates the communication periodically. My Question can the scheduled task (function) still be called while the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
/cc @mkouba (scheduler) |
Beta Was this translation helpful? Give feedback.
-
Nope, this is not guaranteed. In general, the Finally, if the |
Beta Was this translation helpful? Give feedback.
Nope, this is not guaranteed.
In general, the
ShutdownEvent
is fired before the CDI container (ArC) is shut down so that a bean can observe this event and the scheduler (either the impl fromquarkus-scheduler
or fromquarkus-quartz
) is shut down after the CDI application/singleton contexts are destroyed. Moreover, a scheduled task can be running during the shutdown.Finally, if the
quarkus.quartz.shutdown-wait-time
config property is set to a non-zero value, then Quarkus will attempt to wait for all running jobs to finish (quarkus-quartz
only).