task: Fix checkCatalyst loop when the queues are long #148
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A current bug that is happening now:
updatedAt
of the task, as callbacks have stoppedcheckCatalyst
loop finally gets to it, it will see a task that has had no updates for minutes-long, treat it as lost and mark it as errored on the APIThis fixes it by improving the exit condition of the
checkCatalyst
step. Instead of only finishing it oncethe task has stoped
running
, we will now update the taskstep
on the API and make sure to stop thecheckCatalyst
loop as soon as the task gets to thefinalize
step. We make sure to update the stepfrom the catalyst callback handler already, so it happens early and stops the
checkCatalyst
loop, notonly when the finalization event gets processed.
Fixes STU-29