Install:
pip install git+ssh://[email protected]/dima-kov/django-mq.git@master
-
Add
mqto INSTALLED_APPS, make sure to place abovedjango.contrib.adminto 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 resolvedMqErrors will be deleted with commandmq_flush_errors
App supports to be used with and without django.