From a8fb5e2a6a0d8a5a1786925019781f1af5084a56 Mon Sep 17 00:00:00 2001 From: Tom Bevan Date: Tue, 17 Oct 2017 15:51:06 +0100 Subject: [PATCH] added stream support for sync --- service.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service.go b/service.go index adf529f..29d4a01 100644 --- a/service.go +++ b/service.go @@ -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