mirror of
https://github.com/django-q2/django-q2.git
synced 2026-09-29 09:58:11 +08:00
Feature/improves multiple databases support (#561)
* feat: adds docker local files to ignore * feat: adds replica key to django q settings * feat: adds multiple database routers testing utility * feat: ensures scheduler works with multiple databases and replicas * feat: adds docker image to support containerized development * refactor: removes unnecessary import * style: improves import styling * docs: adds replica setting to configure documentation
This commit is contained in:
@@ -339,6 +339,16 @@ Using the Django ORM backend will also enable the Queued Tasks table in the Admi
|
||||
If you need better performance , you should consider using a different database backend than the main project.
|
||||
Set ``orm`` to the name of that database connection and make sure you run migrations on it using the ``--database`` option.
|
||||
|
||||
When using the Django database as a message broker, you can set the ``has_replica`` boolean keyword to ensure Django-Q works properly letting a `Database Router <https://docs.djangoproject.com/en/3.2/topics/db/multi-db/>`__. ::
|
||||
|
||||
# example ORM broker connection with replica database
|
||||
|
||||
Q_CLUSTER = {
|
||||
...
|
||||
'orm': 'default',
|
||||
'has_replica': True
|
||||
}
|
||||
|
||||
.. _mongo_configuration:
|
||||
|
||||
mongo
|
||||
|
||||
Reference in New Issue
Block a user