summaryrefslogtreecommitdiffstats
path: root/bin/review-update-needed
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
commit241911ba0cdc36d419ed01a08d8bc107b61aa5be (patch)
treec8efceba6a4574ec0fdeddb256c3f9e5a0ab27b0 /bin/review-update-needed
parentaf711e133497e1b6241f3afceb630cddf19d2476 (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/review-update-needed')
-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