Skip to content

Commit 12583b6

Browse files
cokrondefunkt
authored andcommitted
be more precise when getting pid's of resque workers to kill: do NOT kill resque-web
1 parent 7ca0bf3 commit 12583b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/resque/worker.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ def hostname
456456
# Returns an array of string pids of all the other workers on this
457457
# machine. Useful when pruning dead workers on startup.
458458
def worker_pids
459-
`ps -A -o pid,command | grep [r]esque`.split("\n").map do |line|
459+
`ps -A -o pid,command | grep [r]esque | grep -i "resque-web"`.split("\n").map do |line|
460460
line.split(' ')[0]
461461
end
462462
end

0 commit comments

Comments
 (0)