Skip to content

Commit a2dcb5d

Browse files
committed
remove todo comment about timer
1 parent a2d2dda commit a2dcb5d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

backend/monoprocess/monoprocess.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,10 @@ func (b *monoprocessBackend) CompleteWorkflowTask(
113113
continue
114114
}
115115
b.logger.DebugContext(ctx, "scheduling timer to notify workflow worker")
116-
time.AfterFunc(attr.At.Sub(time.Now()), func() { b.notifyWorkflowWorker(ctx) }) // TODO: cancel timer if the event gets cancelled
116+
// Note that the worker will be notified even if the timer event gets
117+
// cancelled. This is ok, because the poller will simply find no task
118+
// and continue.
119+
time.AfterFunc(attr.At.Sub(time.Now()), func() { b.notifyWorkflowWorker(context.Background()) })
117120
}
118121
for _, e := range workflowEvents {
119122
if e.HistoryEvent.Type != history.EventType_WorkflowExecutionStarted &&

0 commit comments

Comments
 (0)