mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Cleanup
This commit is contained in:
parent
552a4c7f27
commit
79e392ccf0
2 changed files with 3 additions and 3 deletions
|
@ -11,9 +11,11 @@ end
|
|||
|
||||
begin
|
||||
cli = Sidekiq::CLI.new
|
||||
cli.parse
|
||||
cli.run
|
||||
rescue => e
|
||||
raise e if $DEBUG
|
||||
STDERR.puts e.message
|
||||
STDERR.puts e.backtrace.join("\n")
|
||||
exit 1
|
||||
end
|
||||
|
|
|
@ -20,8 +20,6 @@ module Sidekiq
|
|||
boot_system
|
||||
end
|
||||
|
||||
FOREVER = 2_000_000_000
|
||||
|
||||
def run
|
||||
Sidekiq::Manager.redis = RedisConnection.create(:url => @options[:server], :namespace => @options[:namespace])
|
||||
manager = Sidekiq::Manager.new(@options)
|
||||
|
@ -30,7 +28,7 @@ module Sidekiq
|
|||
manager.start!
|
||||
# HACK need to determine how to pause main thread while
|
||||
# waiting for signals.
|
||||
sleep FOREVER
|
||||
sleep
|
||||
rescue Interrupt
|
||||
# TODO Need clean shutdown support from Celluloid
|
||||
log 'Shutting down, pausing 5 seconds to let workers finish...'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue