summaryrefslogtreecommitdiff
path: root/gear/worker.py
diff options
context:
space:
mode:
Diffstat (limited to 'gear/worker.py')
-rw-r--r--gear/worker.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/gear/worker.py b/gear/worker.py
index 40c142b8..4e92be1d 100644
--- a/gear/worker.py
+++ b/gear/worker.py
@@ -83,8 +83,12 @@ while True:
print "building %s" % artifact.name
cmd = ['morph', 'worker-build', '--build-log-on-stdout', artifact.name]
p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True)
- output = p.communicate(input=job.arguments)[0]
- job.sendWorkData(output)
+ p.stdin.write(job.arguments)
+ p.stdin.close()
+ while True:
+ line = p.stdout.readline()
+ if not line: break
+ job.sendWorkData(line)
kind = artifact.kind
@@ -101,6 +105,3 @@ while True:
suffixes.append(filename + '.meta')
upload_files(artifact.cache_key, suffixes)
job.sendWorkComplete(artifact.cache_key)
-
-
-