Comparison

teal-src/plugins/mod_cron.tl @ 12498:c3e47a5dd30d

util.async: Add Teal description file
author Kim Alvefur <zash@zash.se>
date Sun, 08 May 2022 15:21:35 +0200
parent 12489:8b42575738f0
child 12503:ad49bb3a4780
comparison
equal deleted inserted replaced
12497:83f269db6850 12498:c3e47a5dd30d
86 task:run(started_at); 86 task:run(started_at);
87 task.last = started_at; 87 task.last = started_at;
88 task:save(started_at); 88 task:save(started_at);
89 end 89 end
90 90
91 local task_runner = async.runner(run_task); 91 local task_runner : async.runner_t<task_spec> = async.runner(run_task);
92 module:add_timer(1, function() : integer 92 module:add_timer(1, function() : integer
93 module:log("info", "Running periodic tasks"); 93 module:log("info", "Running periodic tasks");
94 local delay = 3600; 94 local delay = 3600;
95 for host in pairs(active_hosts) do 95 for host in pairs(active_hosts) do
96 module:log("debug", "Running periodic tasks for host %s", host); 96 module:log("debug", "Running periodic tasks for host %s", host);