summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-12-01 15:48:49 +0100
committerFabian Mastenbroek <mail.fabianm@gmail.com>2021-12-01 15:48:49 +0100
commit4b37f82c781c3342fc41aecd30787ca3d82b8aa9 (patch)
tree0672697f4ea2e0de9d9056797fbca18eb2b11e16
parenta367b17de2bd1e10fd46c6133bf9ce5c2aca9867 (diff)
bug(workflow): Activate timer even without incoming jobs
This change fixes an issue where a scheduling cycle is not scheduled when there are no incoming jobs. Still, there might be pending tasks that can be scheduled. Therefore, we remove this conditional.
-rw-r--r--opendc-workflow/opendc-workflow-service/src/main/kotlin/org/opendc/workflow/service/internal/WorkflowServiceImpl.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/opendc-workflow/opendc-workflow-service/src/main/kotlin/org/opendc/workflow/service/internal/WorkflowServiceImpl.kt b/opendc-workflow/opendc-workflow-service/src/main/kotlin/org/opendc/workflow/service/internal/WorkflowServiceImpl.kt
index 1cadce44..7b6d8651 100644
--- a/opendc-workflow/opendc-workflow-service/src/main/kotlin/org/opendc/workflow/service/internal/WorkflowServiceImpl.kt
+++ b/opendc-workflow/opendc-workflow-service/src/main/kotlin/org/opendc/workflow/service/internal/WorkflowServiceImpl.kt
@@ -256,7 +256,7 @@ public class WorkflowServiceImpl(
*/
private fun requestSchedulingCycle() {
// Bail out in case we have already requested a new cycle or the queue is empty.
- if (timerScheduler.isTimerActive(Unit) || incomingJobs.isEmpty()) {
+ if (timerScheduler.isTimerActive(Unit)) {
return
}