Skip to content

Commit 297234f

Browse files
committed
Simplify
1 parent 2a1a363 commit 297234f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

backend/monoprocess/monoprocess.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ func (b *monoprocessBackend) CompleteWorkflowTask(
105105
// Note that the worker will be notified even if the timer event gets
106106
// cancelled. This is ok, because the poller will simply find no task
107107
// and continue.
108-
time.AfterFunc(attr.At.Sub(time.Now()), func() { b.notifyWorkflowWorker(context.Background()) })
108+
time.AfterFunc(time.Until(attr.At), func() {
109+
b.notifyWorkflowWorker(ctx)
110+
})
109111
}
110112

111113
b.notifyWorkflowWorker(ctx)

0 commit comments

Comments
 (0)