-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
notifier: respawn workers if they're all dead
Potentially fixes airbrake/airbrake#463 (falling back to sync delivery because there are no running async workers) I noticed I can reliably reproduce this message when I invoke the Rails console and manually send a notice via `Airbrake.notify`. It happens because by default Rails launches [Spring][1], which preloads the app by using the `fork()` system call. And when that happens, as we know, our worker threads die. The fix is simply to respawn workers. It works reliably with the Rails console and I assume it will fix the above mentioned issue. [1]: https://github.com/rails/spring/
- Loading branch information
Showing
5 changed files
with
126 additions
and
88 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
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
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