set exit timeout if no timeout is given

This commit is contained in:
Ilan Steemers
2015-07-07 20:37:03 +02:00
parent 2b3c29b092
commit 729abaf726
2 changed files with 4 additions and 4 deletions
+3 -1
View File
@@ -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()
+1 -3
View File
@@ -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'}