1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Delay launcher until after daemonization

This commit is contained in:
Mike Perham 2013-02-22 12:40:19 -08:00
parent fbd7b2d746
commit b7089ef746
2 changed files with 3 additions and 2 deletions

View file

@ -49,7 +49,6 @@ require 'erb'
require 'sidekiq'
require 'sidekiq/util'
require 'sidekiq/launcher'
module Sidekiq
class CLI
@ -90,6 +89,7 @@ module Sidekiq
logger.info 'Starting processing, hit Ctrl-C to stop'
end
require 'sidekiq/launcher'
@launcher = Sidekiq::Launcher.new(options)
launcher.procline(options[:tag] ? "#{options[:tag]} " : '')
@ -121,6 +121,8 @@ module Sidekiq
private
def load_celluloid
raise "Celluloid cannot be required until here, or it will break Sidekiq's daemonization" if defined?(::Celluloid)
# Celluloid can't be loaded until after we've daemonized
# because it spins up threads and creates locks which get
# into a very bad state if forked.

View file

@ -1,4 +1,3 @@
require 'sidekiq/util'
require 'sidekiq/manager'
require 'sidekiq/scheduled'