Skip to content

Commit 4a3fcd2

Browse files
committed
fix qrunner context for now
1 parent c996d7a commit 4a3fcd2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dbos/queue.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func queueRunner(executor *dbosContext) {
118118
for queueName, queue := range workflowQueueRegistry {
119119
getLogger().Debug("Processing queue", "queue_name", queueName)
120120
// Call DequeueWorkflows for each queue
121-
dequeuedWorkflows, err := executor.systemDB.DequeueWorkflows(executor.ctx, queue, executor.executorID, executor.applicationVersion)
121+
dequeuedWorkflows, err := executor.systemDB.DequeueWorkflows(executor.queueRunnerCtx, queue, executor.executorID, executor.applicationVersion)
122122
if err != nil {
123123
if pgErr, ok := err.(*pgconn.PgError); ok {
124124
switch pgErr.Code {
@@ -183,7 +183,7 @@ func queueRunner(executor *dbosContext) {
183183

184184
// Sleep with jittered interval, but allow early exit on context cancellation
185185
select {
186-
case <-executor.ctx.Done():
186+
case <-executor.queueRunnerCtx.Done():
187187
getLogger().Info("Queue runner stopping due to context cancellation")
188188
return
189189
case <-time.After(sleepDuration):

0 commit comments

Comments
 (0)