From c6f4ea5ccc10c9441345f83d9ea6b0d2a121ede4 Mon Sep 17 00:00:00 2001 From: Mart Raudsepp Date: Wed, 7 Dec 2016 04:39:40 +0200 Subject: sync: Don't forget to commit db transaction after all packages are synced Sometimes don't need to cancel out, so save the updates after the last modulo 100 to DB too :) --- backend/lib/sync.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/lib/sync.py b/backend/lib/sync.py index 0250fba..8c687c6 100644 --- a/backend/lib/sync.py +++ b/backend/lib/sync.py @@ -193,3 +193,5 @@ def sync_versions(): print("%d packages updated, committing DB transaction" % cnt) db.session.commit() now = datetime.utcnow() + + db.session.commit() -- cgit v1.2.3-65-gdbad