Skip to content

Commit

Permalink
Use new scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
schroda committed Jul 15, 2023
1 parent a0e3d77 commit b7ca600
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ object HAScheduler {
scheduledTasks.forEach {
val missedExecution = currentTime - it.getLastExecutionTime() - elapsedTime < 0
val taskInterval = it.getNextExecutionTime() - it.getLastExecutionTime()
// in case the next task execution doesn't take long the missed execution can be ignored to prevent a double execution
val taskThresholdMet = taskInterval * TASK_THRESHOLD > it.getTimeToNextExecution()

val triggerTask = missedExecution && taskThresholdMet
Expand Down

0 comments on commit b7ca600

Please sign in to comment.