Skip to content

Commit 414947a

Browse files
committed
Remove context deadline
Quick fix. We use the heartbeat middlewear which allows long-running jobs to work. However, the context is also ending up canceled which is causing other issues.
1 parent 2d5297f commit 414947a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

worker.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ func (w *Worker) RunOnce(ctx context.Context, queueID string, h ContextHandleFun
157157
}
158158

159159
handle := func(job *Job, o *DequeueOptions) error {
160-
ctx, cancel := context.WithTimeout(ctx, opt.MaxExecutionTime)
161-
defer cancel()
160+
//ctx, cancel := context.WithTimeout(ctx, opt.MaxExecutionTime)
161+
//defer cancel()
162162
return h(ctx, job, o)
163163
}
164164
for _, mw := range opt.HandleMiddleware {

0 commit comments

Comments
 (0)