Mercurial > prosody-modules
comparison mod_http_host_status_check/mod_http_host_status_check.lua @ 6389:ba68b74ebfb8
mod_http_host_status_check: Use util.time instead of prosody.util.time, for 0.12 compatibility
| author | Link Mauve <linkmauve@linkmauve.fr> |
|---|---|
| date | Sun, 01 Feb 2026 14:09:34 +0100 |
| parents | 5a76973e4304 |
| children |
comparison
equal
deleted
inserted
replaced
| 6388:3b4cbcaf7b11 | 6389:ba68b74ebfb8 |
|---|---|
| 1 local heartbeats = module:shared("/*/host_status_check/heartbeats"); | 1 local heartbeats = module:shared("/*/host_status_check/heartbeats"); |
| 2 local events = module:shared("/*/host_status_check/connection_events"); | 2 local events = module:shared("/*/host_status_check/connection_events"); |
| 3 local host_status_ok = module:shared("host_status_ok"); | 3 local host_status_ok = module:shared("host_status_ok"); |
| 4 | 4 |
| 5 local time = require "prosody.util.time".now; | 5 local time = require "util.time".now; |
| 6 local template = require "util.interpolation".new("%b{}", function (s) return s end) | 6 local template = require "util.interpolation".new("%b{}", function (s) return s end) |
| 7 | 7 |
| 8 module:depends "http" | 8 module:depends "http" |
| 9 | 9 |
| 10 local threshold = module:get_option_number("status_check_heartbeat_threshold", 10); | 10 local threshold = module:get_option_number("status_check_heartbeat_threshold", 10); |
