From 7a5cb35c800744146686fd549ba0ec180aa955fe Mon Sep 17 00:00:00 2001 From: Timo Volkmann Date: Tue, 15 Dec 2020 14:34:14 +0100 Subject: [PATCH] api operations idempotent --- core/service.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/service.go b/core/service.go index ba27348..8b8d65a 100644 --- a/core/service.go +++ b/core/service.go @@ -63,9 +63,11 @@ func (t *trackingService) StartPipeline(cols ...CollectorType) (string, error) { return "RECORDING", errors.New(txt) } if t.opMode == LIVE { - logrus.Warn("trackingservice: stop current running stream/record before creating new one") - t.StopAll() + txt := "trackingservice: stop current running stream before creating new one" + logrus.Warn(txt) + //t.StopAll() //time.Sleep(1000 * time.Millisecond) + return "record already running since: " + t.current.TimeCreated.String(), errors.New(txt) } logrus.Debug("new tracking:", cols) t.opMode = LIVE