management: Use signal.pause to sleep forever.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-10-05 15:13:17 -07:00
committed by Tim Abbott
parent 81d21068b5
commit 363374346c

View File

@@ -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):