From 89f801ac0458d9362592f249c32ee8a5ebde259f Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 24 Oct 2013 15:58:28 +1100 Subject: [PATCH] fix no sidetiq when using demon --- lib/demon/sidekiq.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/demon/sidekiq.rb b/lib/demon/sidekiq.rb index 9ad4b4507..f4820f35c 100644 --- a/lib/demon/sidekiq.rb +++ b/lib/demon/sidekiq.rb @@ -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