Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

fix: add retry for sending slack messages #730

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tubular/slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import logging
import requests

from tubular.utils.retry import retry

Check warning on line 6 in tubular/slack.py

View check run for this annotation

Codecov / codecov/patch

tubular/slack.py#L6

Added line #L6 was not covered by tests

SLACK_API_URL = "https://slack.com"
NOTIFICATION_POST = "/api/chat.postMessage"
AUTH_HEADER_FIELD = "Authorization"
Expand All @@ -16,7 +18,7 @@
Raised upon a failure to send a Slack message to a channel.
"""


@retry()

Check warning on line 21 in tubular/slack.py

View check run for this annotation

Codecov / codecov/patch

tubular/slack.py#L21

Added line #L21 was not covered by tests
def submit_slack_message(auth_token, channels, message):
"""
Post a message to one or more slack channels.
Expand Down
Loading