From 4b37f82c781c3342fc41aecd30787ca3d82b8aa9 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Wed, 1 Dec 2021 15:48:49 +0100 Subject: 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. --- .../kotlin/org/opendc/workflow/service/internal/WorkflowServiceImpl.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'opendc-workflow/opendc-workflow-service/src') 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 } -- cgit v1.2.3