Skip to content

Commit

Permalink
Correct location of before_fork call
Browse files Browse the repository at this point in the history
  • Loading branch information
betamatt committed Jun 23, 2011
1 parent 44f8925 commit 4b0f030
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/delayed/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ def initialize(args)
end

def daemonize
Delayed::Worker.before_fork

dir = @options[:pid_dir]
Dir.mkdir(dir) unless File.exists?(dir)

Expand All @@ -79,6 +77,7 @@ def daemonize
end

def run_process(process_name, dir)
Delayed::Worker.before_fork
Daemons.run_proc(process_name, :dir => dir, :dir_mode => :normal, :monitor => @monitor, :ARGV => @args) do |*args|
$0 = File.join(@options[:prefix], process_name) if @options[:prefix]
run process_name
Expand Down

0 comments on commit 4b0f030

Please sign in to comment.