No autoflush on metadata.db change

This commit is contained in:
Ozzie Isaacs
2021-01-10 11:01:54 +01:00
parent 4a9b01e93b
commit 6f9e52792a
3 changed files with 14 additions and 6 deletions
+1
View File
@@ -123,6 +123,7 @@ class TaskConvert(CalibreTask):
book=book_id, uncompressed_size=os.path.getsize(file_path + format_new_ext))
try:
local_db.session.merge(new_format)
local_db.session.flush()
local_db.session.commit()
except SQLAlchemyError as e:
local_db.session.rollback()