Skip to content

Commit

Permalink
Notifications: save format_values when on_retry exception (#11020)
Browse files Browse the repository at this point in the history
  • Loading branch information
humitos authored Jan 10, 2024
1 parent 4a864c3 commit d28c1e7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion readthedocs/projects/tasks/builds.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,8 +684,12 @@ def on_retry(self, exc, task_id, args, kwargs, einfo):
project_slug=self.data.project.slug,
version_slug=self.data.version.slug,
)

# Grab the format values from the exception in case it contains
format_values = exc.format_values if hasattr(exc, "format_values") else None
self.data.director.attach_notification(
BuildMaxConcurrencyError.LIMIT_REACHED
BuildMaxConcurrencyError.LIMIT_REACHED,
format_values=format_values,
)
self.update_build(state=BUILD_STATE_TRIGGERED)

Expand Down

0 comments on commit d28c1e7

Please sign in to comment.