mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Merge pull request #1494 from Jellyfishboy/master
Added rescue to prevent crashing on Windows
This commit is contained in:
commit
72c3fe9a54
1 changed files with 6 additions and 2 deletions
|
@ -46,9 +46,13 @@ module Sidekiq
|
||||||
self_read, self_write = IO.pipe
|
self_read, self_write = IO.pipe
|
||||||
|
|
||||||
%w(INT TERM USR1 USR2 TTIN).each do |sig|
|
%w(INT TERM USR1 USR2 TTIN).each do |sig|
|
||||||
|
begin
|
||||||
trap sig do
|
trap sig do
|
||||||
self_write.puts(sig)
|
self_write.puts(sig)
|
||||||
end
|
end
|
||||||
|
rescue ArgumentError
|
||||||
|
puts "Signal #{sig} not supported"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
redis {} # noop to connect redis and print info
|
redis {} # noop to connect redis and print info
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue