Navigation Menu

Skip to content

Commit

Permalink
grep [t]hing means you dont need grep -v grep
Browse files Browse the repository at this point in the history
  • Loading branch information
defunkt committed Aug 19, 2011
1 parent 06bf675 commit 2cbc85a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/resque/worker.rb
Expand Up @@ -498,7 +498,7 @@ def linux_worker_pids
# Returns an Array of string pids of all the other workers on this
# machine. Useful when pruning dead workers on startup.
def solaris_worker_pids
`ps -A -o pid,comm | grep ruby | grep -v grep | grep -v "resque-web"`.split("\n").map do |line|
`ps -A -o pid,comm | grep [r]uby | grep -v "resque-web"`.split("\n").map do |line|
real_pid = line.split(' ')[0]
pargs_command = `pargs -a #{real_pid} 2>/dev/null | grep [r]esque | grep -v "resque-web"`
if pargs_command.split(':')[1] == " resque-#{Resque::Version}"
Expand Down

0 comments on commit 2cbc85a

Please sign in to comment.