fixed issue w/ websockets not connecting for streaming stdout

This commit is contained in:
Brad Rydzewski 2014-07-11 16:00:04 -07:00
parent eae495534b
commit fa0213ab8d
2 changed files with 7 additions and 3 deletions

View file

@ -20,7 +20,7 @@ angular.module('app').service('stdout', ['$window', function($window) {
this.unsubscribe = function() { this.unsubscribe = function() {
callback = undefined; callback = undefined;
if (webscoket != undefined) { if (websocket != undefined) {
websocket.close(); websocket.close();
} }
}; };

View file

@ -1,6 +1,7 @@
package worker package worker
import ( import (
"log"
"path/filepath" "path/filepath"
"time" "time"
@ -97,7 +98,10 @@ func (w *worker) Execute(r *Request) {
// been parsed in the hook, so we can be confident it will succeed. // been parsed in the hook, so we can be confident it will succeed.
// that being said, we should clean this up // that being said, we should clean this up
params, _ := r.Repo.ParamMap() 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 path := r.Repo.Host + "/" + r.Repo.Owner + "/" + r.Repo.Name
repo := &repo.Repo{ repo := &repo.Repo{
@ -129,7 +133,7 @@ func (w *worker) Execute(r *Request) {
builder.Privileged = r.Repo.Privileged builder.Privileged = r.Repo.Privileged
// run the build // run the build
err := builder.Run() err = builder.Run()
// update the build status based on the results // update the build status based on the results
// from the build runner. // from the build runner.