Skip to content

Commit

Permalink
Merge branch 'systemime/perf_respect_django_routing' of github.com:sy…
Browse files Browse the repository at this point in the history
…stemime/django-celery-beat into systemime/perf_respect_django_routing
  • Loading branch information
qifeng committed Jan 20, 2022
2 parents bd22e7f + dbb0cde commit 958a671
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion django_celery_beat/schedulers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@
from kombu.utils.json import dumps, loads

from django.conf import settings
<<<<<<< HEAD
from django.db import (
DEFAULT_DB_ALIAS,
close_old_connections,
router,
transaction
)
=======
from django.db import transaction, close_old_connections, router, DEFAULT_DB_ALIAS
>>>>>>> dbb0cde78b3b0bdcd444405cc4ac68ccf8835076
from django.db.utils import DatabaseError, InterfaceError
from django.core.exceptions import ObjectDoesNotExist

Expand Down Expand Up @@ -300,7 +304,7 @@ def target_db(self):
# If the project does not actually implement this method,
# DEFAULT_DB_ALIAS will be automatically returned.
# The exception will be located to the django routing section
db = router.db_for_write(self.Model)
db = router.db_for_write(self.Model
return db

def _sync(self):
Expand Down

0 comments on commit 958a671

Please sign in to comment.