mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-23 21:46:44 +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):
|
||||
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))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user