You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Juri Berlanda (JIRA)" <ji...@apache.org> on 2019/02/09 10:01:00 UTC

[jira] [Created] (DELTASPIKE-1369) [Scheduler] Enable/Disable based on custom condition

Juri Berlanda created DELTASPIKE-1369:
-----------------------------------------

             Summary: [Scheduler] Enable/Disable based on custom condition
                 Key: DELTASPIKE-1369
                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-1369
             Project: DeltaSpike
          Issue Type: Improvement
          Components: Scheduler
            Reporter: Juri Berlanda


As discussed on the mailing list, I propose to introduce some kind of pluggable Bean, which would allow to control both whether the Scheduler as a whole should start, as well as to provide a hook for controlling each single task invocation.

The default implementation would always return true on both, which makes sure the default behavior is the same as it has alays been. Being a Bean, it can be customized via CDI mechanisms (Specializes, Alternative, etc.).

The Bean should provide the following signature:
boolean isSchedulerEnabled();

boolean shouldJobBeStarted(Class<T>);
TBD:
 * Better name for shouldJobBeStarted?
 * Use JobName in shouldJobBeStarted?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)