statsmanager: Perform an initial collection right after startup is completed
authorKim Alvefur <zash@zash.se>
Sun, 22 Feb 2015 18:44:48 +0100
changeset 6580 1e749832ed3b
parent 6579 b7796a46aec2
child 6583 74946f050209
statsmanager: Perform an initial collection right after startup is completed
core/statsmanager.lua
--- a/core/statsmanager.lua	Sat Feb 21 10:34:56 2015 +0100
+++ b/core/statsmanager.lua	Sun Feb 22 18:44:48 2015 +0100
@@ -48,6 +48,7 @@
 	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