teal-src/prosody/plugins/mod_cron.tl
changeset 13447 98a6ec4ce140
parent 13446 eb0fab7e5d32
equal deleted inserted replaced
13446:eb0fab7e5d32 13447:98a6ec4ce140
   106 		module:log("debug", "Running periodic tasks for host %s", host);
   106 		module:log("debug", "Running periodic tasks for host %s", host);
   107 		for _, task in ipairs(module:context(host):get_host_items("task") as { task_spec } ) do
   107 		for _, task in ipairs(module:context(host):get_host_items("task") as { task_spec } ) do
   108 			task_runner:run(task);
   108 			task_runner:run(task);
   109 		end
   109 		end
   110 	end
   110 	end
   111 	module:log("debug", "Wait %ds", delay);
   111 	module:log("debug", "Wait %gs", delay);
   112 	return delay;
   112 	return delay;
   113 end);
   113 end);
   114 
   114 
   115 -- TODO measure load, pick a good time to do stuff
   115 -- TODO measure load, pick a good time to do stuff
   116 
   116