Skip to content

Commit

Permalink
Pass linked token to trigger execution (#41921)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshLove-msft authored Feb 13, 2024
1 parent 885767a commit a4d19fa
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public async Task ProcessEventsAsync(EventProcessorHostPartition context, IEnume
_logger.LogDebug($"Partition Processor received events and is attempting to invoke function ({details})");

UpdateCheckpointContext(triggerEvents, context);
await TriggerExecute(triggerEvents, context, _functionExecutionToken).ConfigureAwait(false);
await TriggerExecute(triggerEvents, context, linkedCts.Token).ConfigureAwait(false);
eventToCheckpoint = triggerEvents.Last();

// If there is a background timer task, cancel it and dispose of the cancellation token. If there
Expand Down Expand Up @@ -207,7 +207,7 @@ public async Task ProcessEventsAsync(EventProcessorHostPartition context, IEnume
else
{
UpdateCheckpointContext(events, context);
await TriggerExecute(events, context, _functionExecutionToken).ConfigureAwait(false);
await TriggerExecute(events, context, linkedCts.Token).ConfigureAwait(false);
eventToCheckpoint = events.LastOrDefault();
}

Expand Down Expand Up @@ -286,7 +286,7 @@ private async Task MonitorCachedEvents(DateTimeOffset? lastCheckpointTime, Cance
_logger.LogDebug($"Partition Processor has waited MaxWaitTime since last invocation and is attempting to invoke function on all held events ({details})");

UpdateCheckpointContext(triggerEvents, _mostRecentPartitionContext);
await TriggerExecute(triggerEvents, _mostRecentPartitionContext, _functionExecutionToken).ConfigureAwait(false);
await TriggerExecute(triggerEvents, _mostRecentPartitionContext, backgroundCancellationTokenSource.Token).ConfigureAwait(false);
if (!backgroundCancellationTokenSource.Token.IsCancellationRequested)
{
await CheckpointAsync(triggerEvents.Last(), _mostRecentPartitionContext).ConfigureAwait(false);
Expand Down

0 comments on commit a4d19fa

Please sign in to comment.