diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-01-11 09:51:51 -0500 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-01-11 09:51:51 -0500 |
commit | 82d766d1fa234b0be87666ad1cf69a08b2a63921 (patch) | |
tree | 948caba7f3c215137141e9e9c677026332502629 | |
parent | 12d43dbbc4962c1615378a7e2d006bb3327b0ab3 (diff) | |
download | korg-helpers-82d766d1fa234b0be87666ad1cf69a08b2a63921.tar.gz |
Always commit after prepping new epoch
If we prepped new shard, always commit the db transaction in case there
are no new changes to the previous epoch between the runs.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rwxr-xr-x | pr-tracker-bot.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pr-tracker-bot.py b/pr-tracker-bot.py index 5e6ac38..92fc7b9 100755 --- a/pr-tracker-bot.py +++ b/pr-tracker-bot.py @@ -433,6 +433,8 @@ def parse_pull_requests(pirepo, topdir, dryrun): # that returns the revs from the beginning of history logger.info('Preparing for shard roll-over to %s.git', maxshard) db_save_repo_heads(c, (('refs/heads/master', ''),), maxshard) + if not dryrun: + dbconn.commit() # Now let's finish with the previous shard maxshard -= 1 # Refresh these |