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.

management: Use signal.pause to sleep forever.

Anders Kaseorg363374346c08
diff --git a/zerver/lib/management.py b/zerver/lib/management.py
index a27a135c9b9..67e4aa9fde1 100644
--- a/zerver/lib/management.py
+++ b/zerver/lib/management.py
@@ -1,5 +1,5 @@
# Library code for use in management commands
-import time
+import signal
from argparse import ArgumentParser, RawTextHelpFormatter
from typing import Any, Dict, List, Optional
@@ -31,7 +31,7 @@ def check_config() -> None:
def sleep_forever() -> None:
while True: # nocoverage
- time.sleep(10**9)
+ signal.pause()
class ZulipBaseCommand(BaseCommand):