wmedvede commented on code in PR #1888:
URL:
https://github.com/apache/incubator-kie-kogito-apps/pull/1888#discussion_r1341445092
##########
jobs-service/jobs-service-common/src/main/java/org/kie/kogito/jobs/service/scheduler/JobSchedulerManager.java:
##########
@@ -73,26 +74,49 @@ public class JobSchedulerManager {
@Inject
Vertx vertx;
- private AtomicBoolean enabled = new AtomicBoolean(false);
+ final AtomicBoolean enabled = new AtomicBoolean(false);
+
+ final AtomicLong periodicTimerIdForLoadJobs = new AtomicLong(-1l);
void onStartup(@Observes @Priority(Interceptor.Priority.PLATFORM_AFTER)
StartupEvent startupEvent) {
- if (loadJobIntervalInMinutes > schedulerChunkInMinutes) {
- LOGGER.warn("The loadJobIntervalInMinutes ({}) cannot be greater
than schedulerChunkInMinutes ({}), " +
- "setting value {} for both",
- loadJobIntervalInMinutes,
- schedulerChunkInMinutes,
- schedulerChunkInMinutes);
- loadJobIntervalInMinutes = schedulerChunkInMinutes;
+ if (enabled.get()) {
Review Comment:
if the enabled value can be changed only by the MessagingChangeEvent
arrival, and we are already starting the load at this point when needed, I
believe we don't need this method any more.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]