diff --git a/data/cl104/cl104.go b/data/cl104/cl104.go index 9e6e216..0e7a1e3 100644 --- a/data/cl104/cl104.go +++ b/data/cl104/cl104.go @@ -42,11 +42,11 @@ func init() { } } -func ConnectCLs() { +func ConnectCLs(ctx context.Context) { for cl, ch := range cl2Chan { go func(ctx context.Context, cl string, ch chan []byte) { connectingCL(ctx, cl, ch) - }(context.Background(), cl, ch) + }(ctx, cl, ch) } } diff --git a/data/data.go b/data/data.go index 49c643b..a1a750e 100644 --- a/data/data.go +++ b/data/data.go @@ -30,7 +30,7 @@ func (p *Processes) StartDataProcessing() { updatingRedisPhasor(ctx) updatingRedisCL104(ctx) - cl104.ConnectCLs() + cl104.ConnectCLs(ctx) } func (p *Processes) Cancel(ctx context.Context) {