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

Commit

Permalink
fix: add retry for sending slack messages
Browse files Browse the repository at this point in the history
  • Loading branch information
robrap authored Jan 24, 2024
1 parent 38c94e7 commit e9c620b
Showing 1 changed file with 3 additions and 1 deletion.
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 @@ class SlackMessageSendFailure(Exception):
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

0 comments on commit e9c620b

Please sign in to comment.