commit: c6f4ea5ccc10c9441345f83d9ea6b0d2a121ede4 Author: Mart Raudsepp <leio <AT> gentoo <DOT> org> AuthorDate: Wed Dec 7 02:39:40 2016 +0000 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org> CommitDate: Wed Dec 7 02:39:40 2016 +0000 URL: https://gitweb.gentoo.org/proj/grumpy.git/commit/?id=c6f4ea5c
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()