Diff

core/statsmanager.lua @ 6577:1e749832ed3b

statsmanager: Perform an initial collection right after startup is completed
author Kim Alvefur <zash@zash.se>
date Sun, 22 Feb 2015 18:44:48 +0100
parent 6555:7b2d16c14659
child 6582:71b5de1d830b
line wrap: on
line diff
--- 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