Skip to content

Commit 76bd9c9

Browse files
fix(mailman): check on startup and fix trace
1 parent 69ba72e commit 76bd9c9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/mailman/mailman.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ func New(id int, app core.App, bus core.Bus, fileStore endpoint.FileStore, endpo
3232

3333
func (m Mailman) Serve(ctx context.Context) error {
3434
checkC := make(chan struct{}, 1)
35+
checkC <- struct{}{}
36+
3537
release := m.bus.OnMailmanEnqueued(func(ctx context.Context, evt models.EventMailmanEnqueued) error {
3638
select {
3739
case checkC <- struct{}{}:
@@ -65,7 +67,7 @@ func (m Mailman) Serve(ctx context.Context) error {
6567
}
6668
env := *maybeEnv
6769

68-
tracer = tracer.Sticky(trace.WithEnvelope(env.Message.ID))
70+
tracer := tracer.Sticky(trace.WithEnvelope(env.Message.ID))
6971

7072
if err := m.send(ctx, tracer, env); err != nil {
7173
tracer.Trace(ctx, "mailman.error", trace.WithError(err))

0 commit comments

Comments
 (0)