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 @@ -566,7 +566,7 @@ def worker_pids
566566 # Returns an Array of string pids of all the other workers on this
567567 # machine. Useful when pruning dead workers on startup.
568568 def windows_worker_pids
569- `tasklist /FI "IMAGENAME eq ruby.exe" /FO list` . split ( " \n " ) . select { |line | line =~ /^PID:/ } . collect { |line | line . gsub /PID:\s +/ , '' }
569+ `tasklist /FI "IMAGENAME eq ruby.exe" /FO list` . split ( $/ ) . select { |line | line =~ /^PID:/ } . collect { |line | line . gsub /PID:\s +/ , '' }
570570 end
571571
572572 # Find Resque worker pids on Linux and OS X.
@@ -589,7 +589,7 @@ def get_worker_pids(command)
589589 active_worker_pids = [ ]
590590 output = %x[#{ command } ] # output format of ps must be ^<PID> <COMMAND WITH ARGS>
591591 raise 'System call for ps command failed. Please make sure that you have a compatible ps command in the path!' unless $?. success?
592- output . split ( " \n " ) . each { |line |
592+ output . split ( $/ ) . each { |line |
593593 next unless line =~ /resque/i
594594 next if line =~ /resque-web/
595595 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