Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch to do while #EA-3584 #295

Merged
merged 1 commit into from
Dec 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ public static void main(String[] args) {
}
ScheduledTaskService scheduledTaskService = getScheduledTasksService(context);
long runningTasks;
while ((runningTasks = scheduledTaskService.getRunningTasksCount()) > 0) {
do {
//wait for execution of schedules tasks
runningTasks = scheduledTaskService.getRunningTasksCount();
if (LOG.isInfoEnabled()) {
LOG.info("Scheduled Tasks to process : {}", runningTasks);
}
Expand All @@ -78,7 +79,7 @@ public static void main(String[] args) {
SpringApplication.exit(context);
System.exit(-2);
}
}
} while (runningTasks > 0);

// failed application execution should be indicated with negative codes
LOG.info("Stoping application after processing all Schdeduled Tasks!");
Expand Down
Loading