website subscribes to build events, update pages

This commit is contained in:
Brad Rydzewski
2015-04-25 21:27:24 -07:00
parent 8e6fbc8ceb
commit 96b49cf0fc
7 changed files with 45 additions and 28 deletions

View File

@@ -48,9 +48,11 @@ func PushBuild(c *gin.Context) {
return
}
if repo.Last == nil || build.Number >= repo.Last.Number {
repo.Last = build
store.SetRepo(repo)
if build.State != common.StatePending && build.State != common.StateRunning {
if repo.Last == nil || build.Number >= repo.Last.Number {
repo.Last = build
store.SetRepo(repo)
}
}
// <-- FIXME