fix no sidetiq when using demon

This commit is contained in:
Sam 2013-10-24 15:58:28 +11:00
parent 636976e5d4
commit 89f801ac04
1 changed files with 3 additions and 1 deletions

View File

@ -151,8 +151,10 @@ class Demon::Sidekiq < Demon::Base
def after_fork
require 'sidekiq/cli'
begin
# Reload initializer cause it needs to run after sidekiq/cli
# was required
load Rails.root + "config/initializers/sidekiq.rb"
cli = Sidekiq::CLI.instance
cli.parse([])
cli.run