summaryrefslogtreecommitdiff
path: root/gear/worker.py
diff options
context:
space:
mode:
Diffstat (limited to 'gear/worker.py')
-rw-r--r--gear/worker.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/gear/worker.py b/gear/worker.py
index 1c02a112..d1e876d1 100644
--- a/gear/worker.py
+++ b/gear/worker.py
@@ -9,23 +9,22 @@ from subprocess import Popen, PIPE, STDOUT
while True:
- print "waiting for job"
+ print "DEBUG: Waiting for job"
job = worker.getJob()
- print "received job"
+ print "DEBUG: Received job '%s'" % job.name
if job.name == "reverse":
for x in range(0, 100000):
job.sendWorkData("This is: %s" % x)
job.sendWorkComplete("answer")
elif job.name == "build-graph":
bg_request=json.loads(job.arguments)
- print "build graph!!!"
- print bg_request['repo']
- print bg_request['ref']
- print bg_request['system']
+ print ("DEBUG: Starting build-graph calculation for Repo: '%s' "
+ "Ref: '%s' System: '%s'") % (bg_request['repo'],
+ bg_request['ref'],
+ bg_request['system'])
cmd = ['morph', 'calculate-build-graph', '--quiet', bg_request['repo'], bg_request['ref'], bg_request['system']]
- print cmd
p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True)
output = p.stdout.read()
- print "finished computing build graph"
+ print "DEBUG: finished computing build graph"
job.sendWorkComplete(output)