-
Notifications
You must be signed in to change notification settings - Fork 619
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
eventhandler: fix bugs and clean up task handler
This commit fixes a bunch of things in the task handler code: 1. Breaking up the really long submitTaskEvents method: The callback for the the backoff has been moved into its own named method from the in-place anonymous method (send()) 2. The backoff callback method now returns an error when there's an error submitting state change to ECS backend. This fixes a bug with the old version of the code where the backoff would never happen on errors because the error was never propagated all the way up 3. The race-condition between startDrainEventsTicker() and AddStateChangeEvent() when both are trying to submit changes to the same task is fixed as the tasksToEvents is used to group events belonging to the same task and only cleaned up when events are submitted instead of being cleaned before invoking the submitTaskEvents() routine
Showing
2 changed files
with
306 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters