diff options
author | Mart Raudsepp <leio@gentoo.org> | 2016-12-07 04:39:40 +0200 |
---|---|---|
committer | Mart Raudsepp <leio@gentoo.org> | 2016-12-07 04:39:40 +0200 |
commit | c6f4ea5ccc10c9441345f83d9ea6b0d2a121ede4 (patch) | |
tree | 71d1453d6a4be94c97c40d2f8eba7ec27828ae44 | |
parent | sync: Order package details syncing based on how old the last sync was (diff) | |
download | grumpy-c6f4ea5ccc10c9441345f83d9ea6b0d2a121ede4.tar.gz grumpy-c6f4ea5ccc10c9441345f83d9ea6b0d2a121ede4.tar.bz2 grumpy-c6f4ea5ccc10c9441345f83d9ea6b0d2a121ede4.zip |
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 :)
-rw-r--r-- | backend/lib/sync.py | 2 |
1 files changed, 2 insertions, 0 deletions
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() |