From fa0213ab8d51fccc7c4d5cc92d4789f793317a0d Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Fri, 11 Jul 2014 16:00:04 -0700 Subject: [PATCH] fixed issue w/ websockets not connecting for streaming stdout --- server/app/scripts/services/stdout.js | 2 +- server/worker/worker.go | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/server/app/scripts/services/stdout.js b/server/app/scripts/services/stdout.js index 75f827c83..18ce7e608 100644 --- a/server/app/scripts/services/stdout.js +++ b/server/app/scripts/services/stdout.js @@ -20,7 +20,7 @@ angular.module('app').service('stdout', ['$window', function($window) { this.unsubscribe = function() { callback = undefined; - if (webscoket != undefined) { + if (websocket != undefined) { websocket.close(); } }; diff --git a/server/worker/worker.go b/server/worker/worker.go index 0fe151c16..85ec4d58c 100644 --- a/server/worker/worker.go +++ b/server/worker/worker.go @@ -1,6 +1,7 @@ package worker import ( + "log" "path/filepath" "time" @@ -97,7 +98,10 @@ func (w *worker) Execute(r *Request) { // been parsed in the hook, so we can be confident it will succeed. // that being said, we should clean this up params, _ := r.Repo.ParamMap() - script, _ := script.ParseBuild(r.Commit.Config, params) + script, err := script.ParseBuild(r.Commit.Config, params) + if err != nil { + log.Printf("Error parsing YAML for %s/%s, Err: %s", r.Repo.Owner, r.Repo.Name, err.Error()) + } path := r.Repo.Host + "/" + r.Repo.Owner + "/" + r.Repo.Name repo := &repo.Repo{ @@ -129,7 +133,7 @@ func (w *worker) Execute(r *Request) { builder.Privileged = r.Repo.Privileged // run the build - err := builder.Run() + err = builder.Run() // update the build status based on the results // from the build runner.