Skip to content
This repository has been archived by the owner on Dec 31, 2021. It is now read-only.

Commit

Permalink
Node has been completed
Browse files Browse the repository at this point in the history
  • Loading branch information
owulveryck committed Dec 13, 2015
1 parent fabad26 commit 0f984f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion example/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
{
"id": 2,
"name": "c",
"engine": "sleep",
"engine": "shell",
"artifact": "example/script.sh",
"args": [
"-e",
Expand Down
2 changes: 2 additions & 0 deletions orchestrator/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0f984f0

Please sign in to comment.