-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add `sleep-jitter` config/flag to sleep. So when deployed in large scale, this will reduce the likelihood for having all the servers banning the remote endpoint at once. In this change `runChan` is replaced with a lambda function `runOnce`, which is a non-blocking function to trigger a single run, and it returns if ansible is running already. Which removes the possibility that multiple ansible runs queued up and runs back to back. When sleep jitter is specified, the puller will sleep a duration that conforms to uniform distribution `U(sleep-jitter, sleep+jitter)`. Otherwise the behavior remains unchanged.
- Loading branch information
Showing
2 changed files
with
36 additions
and
18 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