Skip to content

Commit

Permalink
Fixes race condition where the updated incident is marked as stable, …
Browse files Browse the repository at this point in the history
…but the update flow has not yet completed. (#4295)
  • Loading branch information
metroid-samus authored Jan 25, 2024
1 parent 4c55841 commit 190c351
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/dispatch/incident_cost/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ def calculate_incident_response_cost_with_classic_model(incident: Incident, inci
# we use the role's renounced_at time
participant_role_renounced_at = participant_role.renounced_at
else:
# Fixes race condition where the updated incident is marked as stable, but the update flow has not yet completed.
incident.stable_at = datetime.utcnow()

# we set the renounced_at default time to the stable_at time
participant_role_renounced_at = incident.stable_at

Expand Down

0 comments on commit 190c351

Please sign in to comment.