Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add notification timeout #818

Merged
merged 2 commits into from
Sep 18, 2023
Merged

Add notification timeout #818

merged 2 commits into from
Sep 18, 2023

Conversation

benoit74
Copy link
Collaborator

Rationale

All requests operations should have a timeout otherwise the code is waiting indefinitely for an HTTP response.

Notifications (at the end of a task) must have such a timeout.

Default timeout is small (5 secs) to avoid issues if not set (no reason to wait for a process which is "fire-and-forget" by design).

An HTTP timeout during a notification is catched and logged as an error but will not stop further notification to proceed and will not stop the changes to be commited to the DB.

This is a tentative to enhance situation on #817.

Changes

  • add a constant / environment variable named `` with default value 5
  • use this for slack, webhook and mail notifications

@benoit74 benoit74 self-assigned this Sep 18, 2023
@benoit74 benoit74 merged commit 996fc8e into main Sep 18, 2023
5 checks passed
@benoit74 benoit74 deleted the add_notification_timeout branch September 18, 2023 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant