aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/apt-panopticon-report-email-web.lua
diff options
context:
space:
mode:
authoronefang2019-12-04 08:14:59 +1000
committeronefang2019-12-04 08:14:59 +1000
commit515c9b638996838b6eb89482321418ded06aaa52 (patch)
tree5946410c75ca857e15a1555616ebcda60eadd05d /apt-panopticon-report-email-web.lua
parentMove the speed calc to the main script. (diff)
downloadapt-panopticon-515c9b638996838b6eb89482321418ded06aaa52.zip
apt-panopticon-515c9b638996838b6eb89482321418ded06aaa52.tar.gz
apt-panopticon-515c9b638996838b6eb89482321418ded06aaa52.tar.bz2
apt-panopticon-515c9b638996838b6eb89482321418ded06aaa52.tar.xz
Report the timeout differently, the other was a hack that caused problems.
Diffstat (limited to 'apt-panopticon-report-email-web.lua')
-rwxr-xr-xapt-panopticon-report-email-web.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/apt-panopticon-report-email-web.lua b/apt-panopticon-report-email-web.lua
index 9e9d818..3f2f257 100755
--- a/apt-panopticon-report-email-web.lua
+++ b/apt-panopticon-report-email-web.lua
@@ -169,7 +169,7 @@ local status = function(host, results, typ)
169 local e = 0 169 local e = 0
170 local w = 0 170 local w = 0
171 local s = nil ~= mirrors[host].Protocols[typ] 171 local s = nil ~= mirrors[host].Protocols[typ]
172 local to = false 172 local to = results.timeout
173 if ('http' ~= typ) and ('https' ~= typ) and ('ftp' ~= typ) and ('rsync' ~= typ) then s = true end 173 if ('http' ~= typ) and ('https' ~= typ) and ('ftp' ~= typ) and ('rsync' ~= typ) then s = true end
174 if nil ~= results[typ] then 174 if nil ~= results[typ] then
175 e = results[typ].errors 175 e = results[typ].errors
@@ -188,8 +188,8 @@ local status = function(host, results, typ)
188 for i, u in pairs(v) do 188 for i, u in pairs(v) do
189 if "table" == type(u) then 189 if "table" == type(u) then
190 if typ == i then 190 if typ == i then
191 if 0 <= u.errors then e = e + u.errors else to = true end 191 if 0 <= u.errors then e = e + u.errors end
192 if 0 <= u.warnings then w = w + u.warnings else to = true end 192 if 0 <= u.warnings then w = w + u.warnings end
193 end 193 end
194 end 194 end
195 end 195 end
@@ -262,7 +262,7 @@ local collate = function(host, ip, results)
262 end 262 end
263 end 263 end
264 end 264 end
265 else 265 elseif "timeout" ~= k then
266 local a = results[k] 266 local a = results[k]
267 if nil == a then a = 0 end 267 if nil == a then a = 0 end
268 results[k] = a + v 268 results[k] = a + v