From b733cbc75556586e42eee7430879c5d475d62b4e Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Fri, 17 Jan 2025 13:25:04 -0800 Subject: [PATCH] nit --- backend/onyx/onyxbot/slack/listener.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/onyx/onyxbot/slack/listener.py b/backend/onyx/onyxbot/slack/listener.py index 89dee4b3b35..a5ea232129c 100644 --- a/backend/onyx/onyxbot/slack/listener.py +++ b/backend/onyx/onyxbot/slack/listener.py @@ -301,7 +301,7 @@ def acquire_tenants(self) -> None: tenant_id=tenant_id, bot=bot, ) - else: + elif not DEV_MODE: # If no Slack bots, release lock immediately redis_client.delete(OnyxRedisLocks.SLACK_BOT_LOCK) logger.debug( @@ -394,7 +394,7 @@ def start_socket_client( process_slack_event = create_process_slack_event() socket_client.socket_mode_request_listeners.append(process_slack_event) # type: ignore - # Establish a WebSocket connection + # Establish a WebSocket connection to the Socket Mode servers logger.info( f"Connecting socket client for tenant: {tenant_id}, app: {slack_bot_id}" ) @@ -436,7 +436,7 @@ def shutdown(self, signum: int | None, frame: FrameType | None) -> None: except Exception as e: logger.error(f"Error releasing lock for tenant {tenant_id}: {e}") - # Wait for background threads to finish + # Wait for background threads to finish (with a timeout) logger.info("Waiting for background threads to finish...") self.acquire_thread.join(timeout=5) self.heartbeat_thread.join(timeout=5)