mirror of
https://github.com/django-q2/django-q2.git
synced 2026-09-23 21:48:12 +08:00
set exit timeout if no timeout is given
This commit is contained in:
+3
-1
@@ -275,8 +275,10 @@ class Sentinel(object):
|
||||
# Wait for the result queue to empty
|
||||
self.result_queue.join_thread()
|
||||
logger.info('{} waiting for the monitor.'.format(name))
|
||||
count = 0
|
||||
# Wait for everything to close or time out
|
||||
count = 0
|
||||
if not self.timeout:
|
||||
self.timeout = 30
|
||||
while self.status() == Conf.STOPPING and count < self.timeout * 5:
|
||||
sleep(0.2)
|
||||
Stat(self).save()
|
||||
|
||||
@@ -103,6 +103,4 @@ LOGGING = {
|
||||
STATIC_URL = '/static/'
|
||||
|
||||
# Django Q specific
|
||||
Q_CLUSTER = {'name': 'django_q_test',
|
||||
'timeout': 60,
|
||||
'recycle': 100}
|
||||
Q_CLUSTER = {'name': 'django_q_test'}
|
||||
|
||||
Reference in New Issue
Block a user