Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

queue: Fix _on_connection_open_error type to accept reason: str.

Anders Kaseorg9f8ba913fd51
diff --git a/zerver/lib/queue.py b/zerver/lib/queue.py
index 5d7b5158f75..d9a7f47dd30 100644
--- a/zerver/lib/queue.py
+++ b/zerver/lib/queue.py
@@ -275,7 +275,7 @@ class TornadoQueueClient(QueueClient[Channel]):
CONNECTION_FAILURES_BEFORE_NOTIFY = 10
def _on_connection_open_error(
- self, connection: pika.connection.Connection, reason: Exception
+ self, connection: pika.connection.Connection, reason: Union[str, Exception]
) -> None:
self._connection_failure_count += 1
retry_secs = self.CONNECTION_RETRY_SECS