From 8719a7fe7baecde9fb4f4d9c7f2473f0d9bf465b Mon Sep 17 00:00:00 2001 From: Antoine Grondin Date: Tue, 29 Oct 2024 15:53:02 +0900 Subject: [PATCH] fix(localsvc): remove debug code --- internal/localsvc/svc.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/internal/localsvc/svc.go b/internal/localsvc/svc.go index 8f6f21a..13b3bdb 100644 --- a/internal/localsvc/svc.go +++ b/internal/localsvc/svc.go @@ -2,10 +2,8 @@ package localsvc import ( "context" - "encoding/json" "fmt" "log/slog" - "os" "slices" "time" @@ -412,12 +410,6 @@ func (svc *Service) WatchQuery(ctx context.Context, req *connect.Request[qrv1.Wa defer func() { ll.DebugContext(ctx, "accumulator: done accumulating") if len(legs) > 0 { - ll.DebugContext(ctx, "accumulator: trying to send final watch query response, may not work") - if data, err := json.MarshalIndent(legs, "", " "); err != nil { - ll.ErrorContext(ctx, "doesnt jsonize", slog.Any("err", err)) - } else { - os.Stderr.Write(data) - } err = stream.Send(&qrv1.WatchQueryResponse{ Events: legs, }) @@ -455,11 +447,6 @@ func (svc *Service) WatchQuery(ctx context.Context, req *connect.Request[qrv1.Wa if len(legs) < 1 { continue } - if data, err := json.MarshalIndent(legs, "", " "); err != nil { - ll.ErrorContext(ctx, "doesnt jsonize", slog.Any("err", err)) - } else { - os.Stderr.Write(data) - } ll.DebugContext(ctx, "accumulator: sending watch query response") err := stream.Send(&qrv1.WatchQueryResponse{ Events: legs,