-
I have some simplified:
Is this flag needed at all or are any |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
/cc @mkouba (scheduler) |
Beta Was this translation helpful? Give feedback.
-
So the If you want to get rid of the |
Beta Was this translation helpful? Give feedback.
So the
ShutdownEvent
is fired before the CDI container is shut down (otherwise we wouldn't be able to notify the observers) and the scheduler (in both cases, i.e.quarkus-scheduler
andquarkus-quartz
) is stopped when the CDI container is shut down. In other words, the@Scheduled
methods are not "disabled" during the notification.If you want to get rid of the
running
flag boiler plate then try to use theio.quarkus.scheduler.Scheduled.ApplicationNotRunning
skip predicate, e.g. something like@Scheduled(every = "10s", skipExecutionIf = Scheduled.ApplicationNotRunning.class)
.