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 (#730)
Browse files Browse the repository at this point in the history
  • Loading branch information
robrap authored Jan 24, 2024
1 parent 38c94e7 commit 82f39d6
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

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()
def submit_slack_message(auth_token, channels, message):
"""
Post a message to one or more slack channels.
Expand Down

0 comments on commit 82f39d6

Please sign in to comment.