From aeb7e638ee192dddfa52c9c1723b9380f0ec6972 Mon Sep 17 00:00:00 2001 From: onefang Date: Thu, 26 Dec 2019 17:05:35 +1000 Subject: Give mirrors some time to actually finish their rsynsc. --- apt-panopticon.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apt-panopticon.lua b/apt-panopticon.lua index c15c369..fee4e28 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua @@ -816,9 +816,10 @@ local parseRelease = function(host) pkt = tonumber(pkt:sub(2, -2)) local status, new = APT.execute([[TZ="GMT" date -d "$(grep '^Date:' results/]] .. host .. [[/merged/dists/]] .. n .. [[/Release.SORTED | cut -d ' ' -f 2-)" '+%s']], false) new = tonumber(new:sub(2, -2)) - local upd = pkt + APT.mirrors[host].Updated + local upd = pkt + APT.mirrors[host].Updated + local updd = pkt + (APT.mirrors[host].Updated * 1.5) -- Give the mirror time to actually do the update. if pkt > new then - if upd >= now then + if updd >= now then W('Release ' .. n .. ' not updated yet, should update @ ' .. os.date('!%F %T', upd), 'http', 'Updated', host) else E('Release ' .. n .. ' not updated, should have updated @ ' .. os.date('!%F %T', upd) .. ', but was last updated @ ' .. os.date('!%F %T', new), 'http', 'Updated', host) -- cgit v1.1