First draft of a Disque broker

TODO monitoring doesn't work yet
This commit is contained in:
Ilan Steemers
2015-08-30 14:33:35 +02:00
parent 93cbfc37e2
commit d3283571a6
3 changed files with 51 additions and 5 deletions
+7 -1
View File
@@ -33,6 +33,9 @@ class Conf(object):
DJANGO_REDIS = conf.get('django_redis', None)
# Disque broker
DISQUE = conf.get('disque', None)
# Name of the cluster or site. For when you run multiple sites on one redis server
PREFIX = conf.get('name', 'default')
@@ -46,7 +49,6 @@ class Conf(object):
# Maximum number of tasks that each cluster can work on
QUEUE_LIMIT = conf.get('queue_limit', None)
# Number of workers in the pool. Default is cpu count if implemented, otherwise 4.
WORKERS = conf.get('workers', False)
if not WORKERS:
@@ -70,6 +72,10 @@ class Conf(object):
# Number of seconds to wait for a worker to finish.
TIMEOUT = conf.get('timeout', None)
# Number of seconds to wait for acknowledgement before retrying a task
# Only works with brokers that guarantee delivery. Defaults to 0. Meaning no retries.
RETRY = conf.get('retry', 0)
# The Django Admin label for this app
LABEL = conf.get('label', 'Django Q')