summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAntoine Beaupré <anarcat@debian.org>2018-11-22 11:39:16 -0500
committerAntoine Beaupré <anarcat@debian.org>2018-11-22 11:52:54 -0500
commitd353192c6b6c50dfefae5b931a317b1975525565 (patch)
treec78b727902e01828c506cc7e5776c1cd44214a24 /bin
parentd2d7dbf7547b90ff90205e737ede94772d33a6e2 (diff)
look at the latest between update and claimed dates
Previous implementation wouldn't detect updates to the file and only looked at the claimed dates. This was an oversight: the goal was to take into account normal edits to the claimed block as well, so that users can "ping" the claim to extend their claim.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/review-update-needed5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/review-update-needed b/bin/review-update-needed
index fe4103b0d1..fea86f10f8 100755
--- a/bin/review-update-needed
+++ b/bin/review-update-needed
@@ -130,7 +130,10 @@ for entry in all_entries:
args.quiet or print("Claimed-Date: {}".format(format_date(entry['claimed-date'])))
if args.unclaim:
- date_to_format = datetime.utcfromtimestamp(entry['claimed-date'])
+ if entry['last-update'] > entry['claimed-date']:
+ date_to_format = datetime.utcfromtimestamp(entry['last-update'])
+ else:
+ date_to_format = datetime.utcfromtimestamp(entry['claimed-date'])
if datetime.utcnow() - date_to_format > unclaim_delta:
unclaim_pkgs.append(entry['pkg'])
args.quiet or print("Unclaimed: idle for more than {}: {}".format(unclaim_delta, datetime.utcnow() - date_to_format))

© 2014-2024 Faster IT GmbH | imprint | privacy policy