-
Notifications
You must be signed in to change notification settings - Fork 100
Open
Description
Hi,
I use this library in a project with DATABASE_ROUTERS.
As soon as django_apscheduler is not in the 'default' database, I get the following error message:
"select_for_update cannot be used outside of a transaction".
| with transaction.atomic(): |
Which in my opinion is also conclusive, because atomic points to the 'default' db without parameters.
The following sample change fixes my problem:
DATABASE_APPS_MAPPING = {
'django_apscheduler': 'test',
}
with transaction.atomic(using='test'):
Is there another approach to this problem case? I couldn't find any other solution when django_apscheduler is not in my 'default' db.
version:
Django==3.2.9
django-apscheduler==0.6.2
rizkyarlin
Metadata
Metadata
Assignees
Labels
No labels