summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2016-03-18 01:37:06 +0000
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2016-03-27 11:53:02 +0000
commit7101a42e85cd793fe0bc450cbe184adc0fb9e776 (patch)
treeb28b62660f1083f64150163f4de4529813a24729
parent10c3df8270f622bde7d7cb664bf6686f43c6ba7c (diff)
downloadmorph-7101a42e85cd793fe0bc450cbe184adc0fb9e776.tar.gz
Clean up some debug messages, and allow building
Change-Id: I6f132165690c2665bafa8fd48e01cdff218d9856
-rw-r--r--gear/client.py10
-rw-r--r--gear/worker.py1
2 files changed, 2 insertions, 9 deletions
diff --git a/gear/client.py b/gear/client.py
index 5b2814de..2da25571 100644
--- a/gear/client.py
+++ b/gear/client.py
@@ -55,7 +55,6 @@ class theController():
print "Setting them as unbuilt done"
# TODO: check cache before marking as started:
# http://stackoverflow.com/questions/9110593/asynchronous-requests-with-python-requests
- #self.build_started = True
self._check_cache_state(self.artifact)
@@ -81,7 +80,7 @@ class theController():
else:
print key
print ".. wasnt built"
- print "fuk"
+ self.build_started = True
def _map_build_graph(self, artifact, callback, components=[]):
"""Run callback on each artifact in the build graph and return result.
@@ -179,7 +178,6 @@ class theController():
def _mark_artifact_as_built(self, cache_key, name=None):
- print cache_key
def set_state(a):
if a.cache_key == artifact.cache_key:
@@ -187,9 +185,7 @@ class theController():
artifact = self._find_artifact(cache_key, name)
- print "lock set as built"
with self.lock:
- print "set as built %s" % artifact.name
artifact.state = BUILT
if not name and artifact.kind == 'chunk':
# Building a single chunk artifact
@@ -198,8 +194,6 @@ class theController():
# to BUILT
self._map_build_graph(self.artifact, set_state)
- print artifact
-
class CacheRequestClient(gear.Client):
def __init__(self, controller):
@@ -275,7 +269,7 @@ client = controller.graph_client
#job = gear.Job("reverse", "test string")
build_graph_request = {}
build_graph_request['repo'] = "baserock:baserock/definitions"
-build_graph_request['ref'] = "master"
+build_graph_request['ref'] = "fbce45e45da79e5c35341845ec3b3d7c321e6ff2"
build_graph_request['system'] = "systems/minimal-system-x86_64-generic.morph"
s=json.dumps(build_graph_request)
diff --git a/gear/worker.py b/gear/worker.py
index fa23e01c..55b4fa4c 100644
--- a/gear/worker.py
+++ b/gear/worker.py
@@ -116,5 +116,4 @@ while True:
url = urlparse.urljoin(cache_server, '/1.0/artifacts')
r = requests.post(url, json=artifact_names)
- print r.json()
job.sendWorkComplete(json.dumps(r.json()))