forked from tobi/delayed_job
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Calling Delayed::Worker.new multiple times would continue to re-add the plugins to the lifecycle. Some gems and projects use the pattern `Delayed::Worker.new.work_off` to trigger delayed jobs in specs. Over time, the callback chain would get very long and, in our case, caused a StackLevelTooDeep error. Better would be to have a proper singleton: `Delayed::Worker.worker.work_off` In the absence of a proper singleton, this will make the pattern work.
- Loading branch information
1 parent
1f88156
commit bdbbf60
Showing
2 changed files
with
32 additions
and
3 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