Browse Source

A few less steps in some of the time calcs.

master
onefang 1 year ago
parent
commit
7c60fa0c98
2 changed files with 3 additions and 6 deletions
  1. +1
    -2
      apt-panopticommon.lua
  2. +2
    -4
      apt-panopticon.lua

+ 1
- 2
apt-panopticommon.lua View File

@@ -698,8 +698,7 @@ end

APT.now = 0
local status
APT.now = APT.exe('TZ="GMT" ls -l --time-style="+%s" results/stamp | cut -d " " -f 6-6'):Do().result
APT.now = tonumber(APT.now)
APT.now = tonumber(APT.exe('TZ="GMT" ls -l --time-style="+%s" results/stamp | cut -d " " -f 6-6'):Do().result)
local start = 'now-1month'
local step = '10min'
local hb = '150min'


+ 2
- 4
apt-panopticon.lua View File

@@ -853,10 +853,8 @@ local parseRelease = function(host)
coroutine.yield()
D('*>* Resumed coroutine while waiting on - not APT.checkFile(results_old/' .. fRp .. ')')
end
local pkt = APT.exe([[TZ="GMT" date -d "$(grep '^Date:' results/]] .. fRp .. [[ | cut -d ' ' -f 2-)" '+%s']]):Do().result
pkt = tonumber(pkt:sub(2, -2))
local new = APT.exe([[TZ="GMT" date -d "$(grep '^Date:' ]] .. fR .. [[.SORTED | cut -d ' ' -f 2-)" '+%s']]):Do().result
new = tonumber(new:sub(2, -2))
local pkt = tonumber(APT.exe([[TZ="GMT" date -d "$(grep '^Date:' results/]] .. fRp .. [[ | cut -d ' ' -f 2-)" '+%s']]):Do().result:sub(2, -2))
local new = tonumber(APT.exe([[TZ="GMT" date -d "$(grep '^Date:' ]] .. fR .. [[.SORTED | cut -d ' ' -f 2-)" '+%s']]):Do().result:sub(2, -2))
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


Loading…
Cancel
Save