Skip to content

Commit

Permalink
checks
Browse files Browse the repository at this point in the history
  • Loading branch information
tychoish committed Aug 20, 2023
1 parent f216dfc commit 6eb893a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion series/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func NewCollector(ctx context.Context, opts ...CollectorOptionProvider) (*Collec
}

func (c *Collector) Close() error {
c.cancel()
ft.SafeCall(c.cancel)
if c.broker != nil {
c.broker.Stop()
}
Expand Down
3 changes: 2 additions & 1 deletion series/persistance.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ func SocketBackend(opts ...CollectorBakendSocketOptionProvider) (CollectorBacken
return iter.ProcessParallel(
func(ctx context.Context, pub MetricPublisher) (err error) {
defer func() { grip.Error(err); grip.Infoln("done worker;", counter.Load()) }()
counter.Add(1)
grip.Info("start worker")
conn, err := connCache.WaitFront(ctx)
grip.Info("got first conn")
Expand Down Expand Up @@ -441,7 +442,7 @@ func SocketBackend(opts ...CollectorBakendSocketOptionProvider) (CollectorBacken
},
fun.WorkerGroupConfErrorHandler(ec.Add),
fun.WorkerGroupConfNumWorkers(conf.MessageWorkers),
conf.MessageErrorHandling.poolErrorOptions(),
// conf.MessageErrorHandling.poolErrorOptions(),
).PreHook(conPoolWorker.Operation(ec.Add).Once().Go()).PostHook(func() { /* do cancel */ }).Run(ctx)
}, nil
}
5 changes: 2 additions & 3 deletions series/series_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ func TestIntegration(t *testing.T) {
CollectorBackendSocketConfMinDialRetryDelay(100*time.Millisecond),
CollectorBackendSocketConfIdleConns(6),
CollectorBackendSocketConfMaxDialRetryDelay(time.Second),
CollectorBackendSocketConfMessageErrorHandling(CollectorBackendSocketErrorCollect),
CollectorBackendSocketConfDialErrorHandling(CollectorBackendSocketErrorCollect),
),
CollectorBackendSocketConfMessageErrorHandling(CollectorBackendSocketErrorPanic),
CollectorBackendSocketConfDialErrorHandling(CollectorBackendSocketErrorPanic)),
),
))
assert.NotError(t, err)
Expand Down

0 comments on commit 6eb893a

Please sign in to comment.