forked from gocraft/work
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUGFIX: handle errors in worker by not spinning
If there was an error when fetching a job, we previously just keep trying super fast, which burns CPU and prevents wp.Stop() from working. This can happen if Redis is down. Instead of doing that, chill out and sleep for 10 milliseconds. This addresses #7.
- Loading branch information
Showing
2 changed files
with
19 additions
and
0 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