Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
pablonyx committed Jan 17, 2025
1 parent c6f919c commit b733cbc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/onyx/onyxbot/slack/listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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}"
)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit b733cbc

Please sign in to comment.