mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-07 21:28:11 +08:00
Merge pull request #440 from maerteijn/fix-database-router
Fix issues when using multiple databases with a database router
This commit is contained in:
+1
-1
@@ -548,7 +548,7 @@ def scheduler(broker=None):
|
||||
broker = get_broker()
|
||||
close_old_django_connections()
|
||||
try:
|
||||
with db.transaction.atomic():
|
||||
with db.transaction.atomic(using=Schedule.objects.db):
|
||||
for s in (
|
||||
Schedule.objects.select_for_update()
|
||||
.exclude(repeats=0)
|
||||
|
||||
Reference in New Issue
Block a user