Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,10 @@ await WaitForHistoryEventAsync(
ExecutionEventTypes.WaitRegistered);

_runtime = CreateRuntime();
// Recover persisted state before delivering the event. Recovering after the
// event can mistake the newly resumed worker for interrupted work.
await _runtime.DispatchReadyRunsAsync(
recoverInterruptedRuns: true);
var rawEvent = arguments.GetProperty("event");
await _runtime.RaiseEventAsync(
new ExecutionExternalEventRequest
Expand All @@ -449,8 +453,7 @@ await _runtime.RaiseEventAsync(
Payload = JsonNode.Parse(
rawEvent.GetProperty("payload").GetRawText())
});
await _runtime.DispatchReadyRunsAsync(
recoverInterruptedRuns: true);
await _runtime.DispatchReadyRunsAsync();
var final = await WaitForStatusAsync(
_runtime,
run.Id,
Expand Down
Loading