From 0f984f055b59154f88129f910d9ca00c39a10ee1 Mon Sep 17 00:00:00 2001 From: Olivier Wulveryck Date: Sun, 13 Dec 2015 10:10:29 +0100 Subject: [PATCH] Node has been completed --- example/example.json | 2 +- orchestrator/node.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/example/example.json b/example/example.json index 1a2564f..9286654 100644 --- a/example/example.json +++ b/example/example.json @@ -33,7 +33,7 @@ { "id": 2, "name": "c", - "engine": "sleep", + "engine": "shell", "artifact": "example/script.sh", "args": [ "-e", diff --git a/orchestrator/node.go b/orchestrator/node.go index fcfa849..ed540c3 100644 --- a/orchestrator/node.go +++ b/orchestrator/node.go @@ -77,12 +77,14 @@ func (n *Node) Execute() error { // Now loop for the result for err == nil && n.State < Success { + fmt.Println(n) r, err := http.Get(fmt.Sprintf("%v/%v", url, id)) if err != nil { n.State = NotRunnable return err } defer r.Body.Close() + fmt.Println(r.Body) dec := json.NewDecoder(r.Body) if err := dec.Decode(&n); err != nil { n.State = Failure