Mercurial > prosody-modules
changeset 2228:03a4c3209f21
mod_http_host_status_check: Fix some luacheck warnings
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 02 Jul 2016 16:04:35 +0100 |
parents | 7356d722e180 |
children | 2a7e9d9e7339 |
files | mod_http_host_status_check/mod_http_host_status_check.lua |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_http_host_status_check/mod_http_host_status_check.lua Sat Jul 02 16:04:06 2016 +0100 +++ b/mod_http_host_status_check/mod_http_host_status_check.lua Sat Jul 02 16:04:35 2016 +0100 @@ -4,14 +4,13 @@ local time = require "socket".gettime; local template = require "util.interpolation".new("%b{}", function (s) return s end) -local st = require "util.stanza"; module:depends "http" local threshold = module:get_option_number("status_check_heartbeat_threshold", 5); local function status_string(status, duration, comment) - local string_timestamp = ""; + local string_timestamp; if duration then string_timestamp = ("(%0.2fs%s)"):format(duration, comment or ""); elseif comment then @@ -40,7 +39,7 @@ for host in pairs(hosts) do local last_heartbeat_time = heartbeats[host]; - local ok, status_text = true, "OK"; + local ok, status_text = true; local is_component = hosts[host].type == "component" and hosts[host].modules.component;