Skip to content

Commit 2cbc85a

Browse files
committed
grep [t]hing means you dont need grep -v grep
1 parent 06bf675 commit 2cbc85a

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
@@ -498,7 +498,7 @@ def linux_worker_pids
498498
# Returns an Array of string pids of all the other workers on this
499499
# machine. Useful when pruning dead workers on startup.
500500
def solaris_worker_pids
501-
`ps -A -o pid,comm | grep ruby | grep -v grep | grep -v "resque-web"`.split("\n").map do |line|
501+
`ps -A -o pid,comm | grep [r]uby | grep -v "resque-web"`.split("\n").map do |line|
502502
real_pid = line.split(' ')[0]
503503
pargs_command = `pargs -a #{real_pid} 2>/dev/null | grep [r]esque | grep -v "resque-web"`
504504
if pargs_command.split(':')[1] == " resque-#{Resque::Version}"

0 commit comments

Comments
 (0)