Install:
pip install git+ssh://git@github.com/dima-kov/django-mq.git@master
-
Add
mq
to INSTALLED_APPS, make sure to place abovedjango.contrib.admin
to include functionality of queues in admin -
Set redis settings:
MQ_REDIS_HOST = 'localhost' MQ_REDIS_PORT = 6379
-
Set logging:
MQ_LOGGING_DIRECTORY = '/tmp/project-mq-log/' MQ_LOGGING_LOGGERS = [ 'logger_foo', 'logger_bar', ] from mq.logging import configure_logging configure_logging(LOGGING, MQ_LOGGING_LOGGERS, MQ_LOGGING_DIRECTORY)
-
Set a class with queues facade. It is used for admin stats view: (/admin/mq/mqmessagetype/stats/).
This class should be inherited from
mq.queue.queue.BaseQueuesFacade
:MQ_QUEUES_FACADE_CLASS = 'myapp.facade.QueuesFacade`
MQ_FLUSH_ERRORS_DAYS
- specify days after which resolvedMqError
s will be deleted with commandmq_flush_errors
App supports to be used with and without django.