increase waiting time for starting celery

This commit is contained in:
yangdsh 2020-02-18 01:22:32 +00:00 committed by Dana Van Aken
parent 8e399db587
commit 59b723ee83
1 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ from fabric.api import hide, lcd, local
class Command(BaseCommand): class Command(BaseCommand):
help = 'Start celery and celerybeat in the background.' help = 'Start celery and celerybeat in the background.'
celery_cmd = 'python3 manage.py {cmd} {opts} {pipe} &'.format celery_cmd = 'python3 manage.py {cmd} {opts} {pipe} &'.format
max_wait_sec = 15 max_wait_sec = 60
def add_arguments(self, parser): def add_arguments(self, parser):
group = parser.add_mutually_exclusive_group() group = parser.add_mutually_exclusive_group()
@ -124,7 +124,7 @@ class Command(BaseCommand):
for name in ('celery', 'celerybeat'): for name in ('celery', 'celerybeat'):
if os.path.exists(options[name + '_pidfile']): if os.path.exists(options[name + '_pidfile']):
self.stdout.write(self.style.SUCCESS( self.stdout.write(self.style.SUCCESS(
"Successfully started '{}'.".format(name))) "Successfully started '{}' in {} seconds.".format(name, wait_sec)))
else: else:
self.stdout.write(self.style.NOTICE( self.stdout.write(self.style.NOTICE(
"Failed to start '{}'.".format(name))) "Failed to start '{}'.".format(name)))