eschutho commented on code in PR #28797:
URL: https://github.com/apache/superset/pull/28797#discussion_r1626662061
##########
superset/reports/notifications/slack.py:
##########
@@ -193,6 +219,46 @@ def send(self) -> None:
)
else:
client.chat_postMessage(channel=channel, text=body)
+
+ @backoff.on_exception(backoff.expo, SlackApiError, factor=10, base=2,
max_tries=5)
+ @statsd_gauge("reports.slack.send")
+ def send(self) -> None:
+ global_logs_context = getattr(g, "logs_context", {}) or {}
+ try:
+ client = get_slack_client()
+ title = self._content.name
+ body = self._get_body()
+
+ try:
+ channels = self._get_channels(client)
+ except SlackApiError:
+ logger.warning(
+ "Slack scope missing. Using deprecated API to get
channels. Please update your Slack app to use the new API.",
Review Comment:
I assume it will be sent by slack to the error message.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]