statsmanager: Perform an initial collection right after startup is completed
authorKim Alvefur <zash@zash.se>
Sun, 22 Feb 2015 17:44:48 +0000 (18:44 +0100)
committerKim Alvefur <zash@zash.se>
Sun, 22 Feb 2015 17:44:48 +0000 (18:44 +0100)
core/statsmanager.lua

index 62d217ef2a9f2832cadee65a1f46d0ef82afd401..cddaba06efdd93611126b0e10eb597157c27691c 100644 (file)
@@ -48,6 +48,7 @@ if stats_interval then
        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