Skip to content

Commit

Permalink
Merge pull request #44 from ernestio/sync-support
Browse files Browse the repository at this point in the history
Sync support
  • Loading branch information
adriacidre authored Oct 19, 2017
2 parents 67d4dbe + a8fb5e2 commit 3402f45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions service.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ func processBuild(msg *nats.Msg) {
}

switch msg.Subject {
case "build.create", "build.delete", "build.import":
case "build.create", "build.delete", "build.import", "environment.sync":
log.Println("Creating stream: ", id)
ss.CreateStream(id)
ss.Publish(id, &sse.Event{Data: data})
case "build.create.done", "build.create.error", "build.delete.done", "build.delete.error", "build.import.done", "build.import.error":
case "build.create.done", "build.create.error", "build.delete.done", "build.delete.error", "build.import.done", "build.import.error", "environment.sync.done", "environment.sync.error":
ss.Publish(id, &sse.Event{Data: data})
go func(ss *sse.Server) {
// Wait for any late connecting clients before closing stream
Expand Down

0 comments on commit 3402f45

Please sign in to comment.