Vitor-Avila commented on code in PR #35832:
URL: https://github.com/apache/superset/pull/35832#discussion_r2544283666


##########
superset/utils/slack.py:
##########
@@ -59,80 +62,277 @@ def get_slack_client() -> WebClient:
     return client
 
 
-@cache_util.memoized_func(
-    key="slack_conversations_list",
-    cache=cache_manager.cache,
-)
-def get_channels() -> list[SlackChannelSchema]:
-    """
-    Retrieves a list of all conversations accessible by the bot
-    from the Slack API, and caches results (to avoid rate limits).
-
-    The Slack API does not provide search so to apply a search use
-    get_channels_with_search instead.
-    """
-    client = get_slack_client()
-    channel_schema = SlackChannelSchema()
+def _fetch_channels_without_search(
+    client: WebClient,
+    channel_schema: SlackChannelSchema,
+    types_param: str,
+    cursor: Optional[str],
+    limit: int,
+) -> dict[str, Any]:
+    """Fetch channels without search filtering, paginating for large limits."""
     channels: list[SlackChannelSchema] = []
-    extra_params = {"types": ",".join(SlackChannelTypes)}
-    cursor = None
-    page_count = 0
+    slack_cursor = cursor
+    page_size = min(limit, 1000)

Review Comment:
   tks!



-- 
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]

Reply via email to