sadpandajoe commented on code in PR #35622:
URL: https://github.com/apache/superset/pull/35622#discussion_r2433657421
##########
superset/utils/slack.py:
##########
@@ -73,19 +76,45 @@ def get_channels() -> list[SlackChannelSchema]:
channels: list[SlackChannelSchema] = []
extra_params = {"types": ",".join(SlackChannelTypes)}
cursor = None
+ page_count = 0
+
+ logger.info("Starting Slack channels fetch")
+
+ try:
+ while True:
+ page_count += 1
- while True:
- response = client.conversations_list(
- limit=999, cursor=cursor, exclude_archived=True, **extra_params
+ response = client.conversations_list(
+ limit=999, cursor=cursor, exclude_archived=True, **extra_params
+ )
+ page_channels = response.data["channels"]
+ channels.extend(channel_schema.load(channel) for channel in
page_channels)
+
+ logger.info(
Review Comment:
Did we want to do info here? Could be generating a lot of logs
--
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]