Fix otel span lost

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-02-20 12:49:55 +01:00
parent 95d7d3c389
commit c8be45008f

View File

@@ -97,7 +97,9 @@ func NewService(
func (s *Service) Run(ctx context.Context, presenterConfigFunc EmailPresenterConfigFunc) error {
g := errgroup.Group{}
sealingWorkerCtx, stopSealingWorker := context.WithCancel(context.Background())
nonCancelableCtx := context.WithoutCancel(ctx)
sealingWorkerCtx, stopSealingWorker := context.WithCancel(nonCancelableCtx)
sealingWorker := NewSealingWorker(
s.pg,
s.fileManager,
@@ -106,7 +108,7 @@ func (s *Service) Run(ctx context.Context, presenterConfigFunc EmailPresenterCon
)
g.Go(func() error { return sealingWorker.Run(sealingWorkerCtx) })
certWorkerCtx, stopCertWorker := context.WithCancel(context.Background())
certWorkerCtx, stopCertWorker := context.WithCancel(nonCancelableCtx)
certWorker := NewCompletionCertificateWorker(
s.pg,
s.fileManager,