mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-25 14:36:34 +00:00
Be explicit about not using durable with atomic
This commit is contained in:
parent
3b5c776634
commit
b1e7f0eed2
@ -209,13 +209,13 @@ def migrate_queues():
|
|||||||
|
|
||||||
def save_model(instance):
|
def save_model(instance):
|
||||||
if 'sqlite' != db_vendor:
|
if 'sqlite' != db_vendor:
|
||||||
with atomic():
|
with atomic(durable=False):
|
||||||
instance.save()
|
instance.save()
|
||||||
return
|
return
|
||||||
|
|
||||||
# work around for SQLite and its many
|
# work around for SQLite and its many
|
||||||
# "database is locked" errors
|
# "database is locked" errors
|
||||||
with atomic():
|
with atomic(durable=False):
|
||||||
instance.save()
|
instance.save()
|
||||||
time.sleep(random.expovariate(1.5))
|
time.sleep(random.expovariate(1.5))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user