Skip to content

Commit

Permalink
fix(localsvc): remove debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
aybabtme committed Oct 29, 2024
1 parent 5550aa4 commit 8719a7f
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions internal/localsvc/svc.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ package localsvc

import (
"context"
"encoding/json"
"fmt"
"log/slog"
"os"
"slices"
"time"

Expand Down Expand Up @@ -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,
})
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 8719a7f

Please sign in to comment.