From e9c620b900e488bdcb2823bf5b8e9f3895b20b66 Mon Sep 17 00:00:00 2001 From: Robert Raposa Date: Wed, 24 Jan 2024 16:20:34 -0500 Subject: [PATCH] fix: add retry for sending slack messages --- tubular/slack.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tubular/slack.py b/tubular/slack.py index 338b6406..2f71e87d 100644 --- a/tubular/slack.py +++ b/tubular/slack.py @@ -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" @@ -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.