Be explicit about not using durable with atomic

This commit is contained in:
tcely 2025-04-17 03:11:14 -04:00 committed by GitHub
parent 3b5c776634
commit b1e7f0eed2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -209,13 +209,13 @@ def migrate_queues():
def save_model(instance):
if 'sqlite' != db_vendor:
with atomic():
with atomic(durable=False):
instance.save()
return
# work around for SQLite and its many
# "database is locked" errors
with atomic():
with atomic(durable=False):
instance.save()
time.sleep(random.expovariate(1.5))