Skip to content

Commit

Permalink
Merge branch 'master' into enhancement/new-button-for-admins
Browse files Browse the repository at this point in the history
  • Loading branch information
whitdog47 committed Feb 23, 2024
2 parents b1bc534 + 2d32502 commit d2734b7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/dispatch/plugins/dispatch_slack/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import heapq
import logging

from requests import Timeout
from slack_sdk.errors import SlackApiError
from slack_sdk.web.client import WebClient
from slack_sdk.web.slack_response import SlackResponse
Expand Down Expand Up @@ -63,6 +64,10 @@ def make_call(client: WebClient, endpoint: str, **kwargs) -> SlackResponse:
time.sleep(wait)
raise TryAgain from None
raise exception
except Timeout as exception:
log.warn(f"Timeout error {exception} for slack. Endpoint: {endpoint}. Kwargs: {kwargs}")
time.sleep(300)
raise TryAgain from None


def list_conversation_messages(client: WebClient, conversation_id: str, **kwargs) -> SlackResponse:
Expand Down

0 comments on commit d2734b7

Please sign in to comment.