function collect()
local mark_collection_done = mark_collection_start();
+ fire_event("stats-update");
changed_stats, stats_extra = {}, {};
for stat_name, getter in pairs(stats.get_stats()) do
local type, value, extra = getter();
end
timer.add_task(stats_interval, collect);
+ prosody.events.add_handler("server-started", function () collect() end, -1);
else
log("debug", "Statistics collection is disabled");
-- nop