Skip to content

Commit

Permalink
increment waiting on sync
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenlanders committed Mar 27, 2024
1 parent c44408a commit 57e43f1
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions tasks/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -506,14 +506,21 @@ func (s *scheduler) executeTask(task *deliverTxTask) {
task.Ctx = dCtx

// in the synchronous case, we only want to re-execute tasks that need re-executing
// if already validated, then this does another validation
if s.synchronous && task.IsStatus(statusValidated) {
s.shouldRerun(task)
if s.synchronous {
// if already validated, then this does another validation
if task.IsStatus(statusValidated) {
return
s.shouldRerun(task)
if task.IsStatus(statusValidated) {
return
}
}

// waiting transactions may not yet have been reset
// this ensures a task has been reset and incremented
if !task.IsStatus(statusPending) {
task.Reset()
task.Increment()
}
task.Reset()
task.Increment()
}

s.prepareTask(task)
Expand Down

0 comments on commit 57e43f1

Please sign in to comment.