Skip to content

Commit

Permalink
Merge pull request #614 from ungarj/observers_notifications
Browse files Browse the repository at this point in the history
avoid reporting on exception twice; send notification message on deta…
  • Loading branch information
ungarj authored Jan 12, 2024
2 parents a0d3b98 + 74c1749 commit f06b4a7
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 f06b4a7

Please sign in to comment.