summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2016-03-06 19:43:28 +0000
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2016-03-27 11:53:01 +0000
commit51303de0703b7cfc604214da6585c504c50f54b6 (patch)
tree6aa2f837d436ece6e4a00112beb21e45a51d5fbd
parent1656803e515bb65bc3a292b4317c6e4a3f0c4a33 (diff)
downloadmorph-51303de0703b7cfc604214da6585c504c50f54b6.tar.gz
tidy up debug messages
Change-Id: I56b8f86965d820ea509c7efd4921b4860e2ca025
-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)