aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-01-11 09:51:51 -0500
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-01-11 09:51:51 -0500
commit82d766d1fa234b0be87666ad1cf69a08b2a63921 (patch)
tree948caba7f3c215137141e9e9c677026332502629
parent12d43dbbc4962c1615378a7e2d006bb3327b0ab3 (diff)
downloadkorg-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-xpr-tracker-bot.py2
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