File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ STALE_EXEMPTIONS = ["imports"]
77Thread . new do
88 loop do
99 begin
10- lines = `ps -e -o pid,command | grep [r]esque` . split ( " \n " )
10+ lines = `ps -e -o pid,command | grep [r]esque` . split ( $/ )
1111 lines . each do |line |
1212 parts = line . split ( ' ' )
1313 next if parts [ -2 ] != "at"
Original file line number Diff line number Diff line change @@ -548,7 +548,7 @@ def worker_pids
548548 # Returns an Array of string pids of all the other workers on this
549549 # machine. Useful when pruning dead workers on startup.
550550 def windows_worker_pids
551- `tasklist /FI "IMAGENAME eq ruby.exe" /FO list` . split ( " \n " ) . select { |line | line =~ /^PID:/ } . collect { |line | line . gsub /PID:\s +/ , '' }
551+ `tasklist /FI "IMAGENAME eq ruby.exe" /FO list` . split ( $/ ) . select { |line | line =~ /^PID:/ } . collect { |line | line . gsub /PID:\s +/ , '' }
552552 end
553553
554554 # Find Resque worker pids on Linux and OS X.
@@ -571,7 +571,7 @@ def get_worker_pids(command)
571571 active_worker_pids = [ ]
572572 output = %x[#{ command } ] # output format of ps must be ^<PID> <COMMAND WITH ARGS>
573573 raise 'System call for ps command failed. Please make sure that you have a compatible ps command in the path!' unless $?. success?
574- output . split ( " \n " ) . each { |line |
574+ output . split ( $/ ) . each { |line |
575575 next unless line =~ /resque/i
576576 next if line =~ /resque-web/
577577 active_worker_pids . push line . split ( ' ' ) [ 0 ]
Original file line number Diff line number Diff line change 3131
3232 exit_code = MiniTest ::Unit . new . run ( ARGV )
3333
34- processes = `ps -A -o pid,command | grep [r]edis-test` . split ( " \n " )
34+ processes = `ps -A -o pid,command | grep [r]edis-test` . split ( $/ )
3535 pids = processes . map { |process | process . split ( " " ) [ 0 ] }
3636 puts "Killing test redis server..."
3737 pids . each { |pid | Process . kill ( "TERM" , pid . to_i ) }
You can’t perform that action at this time.
0 commit comments