Skip to content

Commit

Permalink
avoid reporting on exception twice; send notification message on deta…
Browse files Browse the repository at this point in the history
…ils of retry attempt
  • Loading branch information
ungarj committed Jan 12, 2024
1 parent a0d3b98 commit 74c1749
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mapchete/commands/_execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,12 @@ def execute(
return

except retry_on_exception as exception:
all_observers.notify(status=Status.failed, exception=exception)

if retries:
retries -= 1
all_observers.notify(status=Status.retrying)
all_observers.notify(
status=Status.retrying,
message=f"run failed due to {str(exception)} (remaining retries: {retries})",
)
else:
raise

Expand Down

0 comments on commit 74c1749

Please sign in to comment.