Skip to content

Commit

Permalink
added stream support for sync
Browse files Browse the repository at this point in the history
  • Loading branch information
purehyperbole committed Oct 17, 2017
1 parent 67d4dbe commit a8fb5e2
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 a8fb5e2

Please sign in to comment.