Skip to content

Commit

Permalink
Merge pull request #2925 from mvocu/engineFixWaitingState
Browse files Browse the repository at this point in the history
fix forgotten tasks in WAITING state
  • Loading branch information
zlamalp committed Oct 21, 2020
1 parent d31724e commit 9a514c3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,17 @@ public void run() {


/**
* Reschedule Tasks in DONE/WARNING if their
* Reschedule Tasks in DONE/WARNING/WAITING state if their
* - source was updated
* - OR haven't run for X hours
* - or have no end time set
*/
private void rescheduleDoneTasks() {

// Reschedule tasks in DONE that haven't been running for quite a while
log.info("Checking DONE/WARNING tasks...");
log.info("Checking DONE/WARNING/WAITING tasks...");

for (Task task : schedulingPool.getTasksWithStatus(TaskStatus.DONE, TaskStatus.WARNING)) {
for (Task task : schedulingPool.getTasksWithStatus(TaskStatus.DONE, TaskStatus.WARNING, TaskStatus.WAITING)) {

LocalDateTime tooManyHoursAgo = LocalDateTime.now().minusHours(oldRescheduleHours);

Expand Down

0 comments on commit 9a514c3

Please sign in to comment.