Skip to content

Commit

Permalink
be more precise when getting pid's of resque workers to kill: do NOT …
Browse files Browse the repository at this point in the history
…kill resque-web
  • Loading branch information
cokron authored and defunkt committed Feb 3, 2011
1 parent 7ca0bf3 commit 12583b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/resque/worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ def hostname
# Returns an array of string pids of all the other workers on this
# machine. Useful when pruning dead workers on startup.
def worker_pids
`ps -A -o pid,command | grep [r]esque`.split("\n").map do |line|
`ps -A -o pid,command | grep [r]esque | grep -i "resque-web"`.split("\n").map do |line|
line.split(' ')[0]
end
end
Expand Down

0 comments on commit 12583b6

Please sign in to comment.