-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
log writing failed. can't be called from trap context #1493
Comments
We can not use logger in signal handler https://bugs.ruby-lang.org/issues/7917, but resque does it Line 377 in c295da9
How to resolve is, for example, use IO.pipe and puts into pipe in the signal handler, and treats the signal somewhere else as sidekiq does https://github.com/mperham/sidekiq/blob/b6de0bae6b86d5abae25852141768d8ecc8ddedf/lib/sidekiq/cli.rb#L53 |
This looks like its dead... has anyone found a good solution to logging from workers? |
https://bugs.ruby-lang.org/issues/14222 has a suggestion for how to do this:
|
On stopping resque:work with Ctrl-C, I get an error as the title.
I added codes to print backtraces to ruby's standard logger and below is the resulted backtrace:
The text was updated successfully, but these errors were encountered: