mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
management commands: Add sleep_forever to lib/management.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# Library code for use in management commands
|
||||
|
||||
import sys
|
||||
import time
|
||||
|
||||
from argparse import ArgumentParser
|
||||
from django.conf import settings
|
||||
@@ -29,6 +30,10 @@ def check_config() -> None:
|
||||
|
||||
raise CommandError("Error: You must set %s in /etc/zulip/settings.py." % (setting_name,))
|
||||
|
||||
def sleep_forever() -> None:
|
||||
while True: # nocoverage
|
||||
time.sleep(10**9)
|
||||
|
||||
class ZulipBaseCommand(BaseCommand):
|
||||
def add_realm_args(self, parser: ArgumentParser, required: bool=False,
|
||||
help: Optional[str]=None) -> None:
|
||||
|
||||
Reference in New Issue
Block a user