Skip to content

Commit 59d2fdf

Browse files
committed
Comments and changes to print out channel names
1 parent ceabe26 commit 59d2fdf

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

modules/models/slack_models/shared_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def __init__(self, team_info: SlackTeamInfo) -> None:
281281

282282
def find_channel_by_name(self, channel_name: str) -> SlackConversationInfo:
283283
logger.debug(f"Finding channel by name: {channel_name}")
284-
logger.debug(f"Full channel list: {self.full_conversation_list}")
284+
logger.debug(f"Full channel list: {[conversation_info.name for conversation_info in self.full_conversation_list]}")
285285
return [
286286
conversation
287287
for conversation in self.full_conversation_list

modules/utils/message_scheduler.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Module for scheduling messages in a background job"""
12
import logging
23
from datetime import datetime, timedelta, timezone
34
from slack_bolt.async_app import AsyncApp
@@ -10,6 +11,13 @@
1011

1112

1213
async def schedule_messages(async_app: AsyncApp) -> None:
14+
"""Schedules messages to be sent to various channels. Pulls the messages from the Airtable table Scheduled Messages
15+
As explained in the comments below, will schedule messages using the `when_to-send` field on the table,
16+
which is calculated by Airtable based on the frequency and `scheduled_next` datetime
17+
18+
:param async_app: the Slack Bolt async application.
19+
:type async_app: slack_bolt.async_app.AsyncApp
20+
"""
1321
logger.info("STAGE: Beginning task schedule_messages...")
1422
messages = scheduled_message_table.all_valid_scheduled_messages
1523
logger.debug(f"Retrieved {len(messages)} total valid messages to be potentially be scheduled")

0 commit comments

Comments
 (0)