perfectqueue 0.8.7 → 0.8.8
Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog
CHANGED
@@ -20,8 +20,8 @@ module PerfectQueue
|
|
20
20
|
module Multiprocess
|
21
21
|
|
22
22
|
class ChildProcess < ThreadProcessor
|
23
|
-
def self.run(runner, config, wpipe)
|
24
|
-
new(runner, config, wpipe).run
|
23
|
+
def self.run(runner, processor_id, config, wpipe)
|
24
|
+
new(runner, processor_id, config, wpipe).run
|
25
25
|
end
|
26
26
|
|
27
27
|
def initialize(runner, processor_id, config, wpipe)
|
@@ -126,8 +126,6 @@ module PerfectQueue
|
|
126
126
|
|
127
127
|
def fork_child
|
128
128
|
# set process name
|
129
|
-
$0 = "perfectqueue:#{@runner} #{@processor_id}"
|
130
|
-
|
131
129
|
@runner.before_fork if @runner.respond_to?(:before_fork) # TODO exception handling
|
132
130
|
|
133
131
|
INTER_FORK_LOCK.lock
|
@@ -145,10 +143,12 @@ module PerfectQueue
|
|
145
143
|
# pass-through STDERR
|
146
144
|
rpipe.close
|
147
145
|
|
146
|
+
$0 = "perfectqueue:#{@runner} #{@processor_id}"
|
147
|
+
|
148
148
|
@runner.after_fork if @runner.respond_to?(:after_fork)
|
149
149
|
|
150
150
|
begin
|
151
|
-
ChildProcess.run(@runner, @config, wpipe)
|
151
|
+
ChildProcess.run(@runner, @processor_id, @config, wpipe)
|
152
152
|
ensure
|
153
153
|
@runner.after_child_end if @runner.respond_to?(:after_child_end) # TODO exception handling
|
154
154
|
end
|
data/lib/perfectqueue/version.rb
CHANGED
data/lib/perfectqueue/worker.rb
CHANGED