aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2020-01-03 23:24:44 +1000
committeronefang2020-01-03 23:24:44 +1000
commit7c60fa0c986c45717a865e179b5d692a7ab08e32 (patch)
tree7f5e1a97befd35653b06fd5cd6b471b518e730eb
parentNot being able to download an updated file while the mirror is still updating... (diff)
downloadapt-panopticon-7c60fa0c986c45717a865e179b5d692a7ab08e32.zip
apt-panopticon-7c60fa0c986c45717a865e179b5d692a7ab08e32.tar.gz
apt-panopticon-7c60fa0c986c45717a865e179b5d692a7ab08e32.tar.bz2
apt-panopticon-7c60fa0c986c45717a865e179b5d692a7ab08e32.tar.xz
A few less steps in some of the time calcs.
Diffstat (limited to '')
-rw-r--r--apt-panopticommon.lua3
-rwxr-xr-xapt-panopticon.lua6
2 files changed, 3 insertions, 6 deletions
diff --git a/apt-panopticommon.lua b/apt-panopticommon.lua
index ffc3af4..dddcc9c 100644
--- a/apt-panopticommon.lua
+++ b/apt-panopticommon.lua
@@ -698,8 +698,7 @@ end
698 698
699APT.now = 0 699APT.now = 0
700local status 700local status
701APT.now = APT.exe('TZ="GMT" ls -l --time-style="+%s" results/stamp | cut -d " " -f 6-6'):Do().result 701APT.now = tonumber(APT.exe('TZ="GMT" ls -l --time-style="+%s" results/stamp | cut -d " " -f 6-6'):Do().result)
702APT.now = tonumber(APT.now)
703local start = 'now-1month' 702local start = 'now-1month'
704local step = '10min' 703local step = '10min'
705local hb = '150min' 704local hb = '150min'
diff --git a/apt-panopticon.lua b/apt-panopticon.lua
index e9b1015..5797f91 100755
--- a/apt-panopticon.lua
+++ b/apt-panopticon.lua
@@ -853,10 +853,8 @@ local parseRelease = function(host)
853 coroutine.yield() 853 coroutine.yield()
854 D('*>* Resumed coroutine while waiting on - not APT.checkFile(results_old/' .. fRp .. ')') 854 D('*>* Resumed coroutine while waiting on - not APT.checkFile(results_old/' .. fRp .. ')')
855 end 855 end
856 local pkt = APT.exe([[TZ="GMT" date -d "$(grep '^Date:' results/]] .. fRp .. [[ | cut -d ' ' -f 2-)" '+%s']]):Do().result 856 local pkt = tonumber(APT.exe([[TZ="GMT" date -d "$(grep '^Date:' results/]] .. fRp .. [[ | cut -d ' ' -f 2-)" '+%s']]):Do().result:sub(2, -2))
857 pkt = tonumber(pkt:sub(2, -2)) 857 local new = tonumber(APT.exe([[TZ="GMT" date -d "$(grep '^Date:' ]] .. fR .. [[.SORTED | cut -d ' ' -f 2-)" '+%s']]):Do().result:sub(2, -2))
858 local new = APT.exe([[TZ="GMT" date -d "$(grep '^Date:' ]] .. fR .. [[.SORTED | cut -d ' ' -f 2-)" '+%s']]):Do().result
859 new = tonumber(new:sub(2, -2))
860 local upd = pkt + APT.mirrors[host].Updated 858 local upd = pkt + APT.mirrors[host].Updated
861 local updd = pkt + (APT.mirrors[host].Updated * 1.5) -- Give the mirror time to actually do the update. 859 local updd = pkt + (APT.mirrors[host].Updated * 1.5) -- Give the mirror time to actually do the update.
862 if pkt > new then 860 if pkt > new then