[ARVADOS] updated: 4f41341675c108e9ffa4e5ba15b8bca521152a67
git at public.curoverse.com
git at public.curoverse.com
Tue Sep 30 09:44:50 EDT 2014
Summary of changes:
services/api/script/crunch-dispatch.rb | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
via 4f41341675c108e9ffa4e5ba15b8bca521152a67 (commit)
from 74bcc470f33cd47ca4106a7565871c07c40f9c00 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 4f41341675c108e9ffa4e5ba15b8bca521152a67
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Tue Sep 30 09:44:45 2014 -0400
3052: Rename variable "std" to "stream"
diff --git a/services/api/script/crunch-dispatch.rb b/services/api/script/crunch-dispatch.rb
index 6dcf7f2..0c5a987 100755
--- a/services/api/script/crunch-dispatch.rb
+++ b/services/api/script/crunch-dispatch.rb
@@ -353,22 +353,22 @@ class Dispatcher
@running.each do |job_uuid, j|
job = j[:job]
- [:stdout, :stderr].each do |std|
- # Read whatever is available from child stderr
+ [:stdout, :stderr].each do |stream|
+ # Read whatever is available from child stream
buf = false
begin
- buf = j[std].read_nonblock(2**20)
+ buf = j[stream].read_nonblock(2**20)
rescue Errno::EAGAIN, EOFError
end
if buf
- j[:buf][std] << buf
- if j[:buf][std].index "\n"
- lines = j[:buf][std].lines("\n").to_a
- if j[:buf][std][-1] == "\n"
- j[:buf][std] = ''
+ j[:buf][stream] << buf
+ if j[:buf][stream].index "\n"
+ lines = j[:buf][stream].lines("\n").to_a
+ if j[:buf][stream][-1] == "\n"
+ j[:buf][stream] = ''
else
- j[:buf][std] = lines.pop
+ j[:buf][stream] = lines.pop
end
lines.each do |line|
$stderr.print "#{job_uuid} ! " unless line.index(job_uuid)
@@ -434,9 +434,9 @@ class Dispatcher
read_pipes
write_log j_done # write any remaining logs
- [:stdout, :stderr].each do |std|
- if j_done[:buf][std] and j_done[:buf][std] != ''
- $stderr.puts j_done[:buf][std] + "\n"
+ [:stdout, :stderr].each do |stream|
+ if j_done[:buf][stream] and j_done[:buf][stream] != ''
+ $stderr.puts j_done[:buf][stream] + "\n"
end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list