mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +00:00
SeedDMSTask.add() returns taskid, task will be passed to function of task
This commit is contained in:
parent
e87d7546a3
commit
970622564c
|
@ -1407,14 +1407,14 @@ $(document).ready(function() { /* {{{ */
|
|||
);
|
||||
|
||||
SeedDMSTask.add = function(task) {
|
||||
tasks.push(task);
|
||||
return tasks.push(task);
|
||||
}
|
||||
|
||||
SeedDMSTask.run = function() {
|
||||
for(let task of tasks) {
|
||||
if(counter % task.interval == 0) {
|
||||
// console.log("Running task '" + task.name + "'");
|
||||
task.func();
|
||||
task.func(task);
|
||||
}
|
||||
}
|
||||
//console.log(counter);
|
||||
|
|
|
@ -1463,14 +1463,14 @@ $(document).ready(function() { /* {{{ */
|
|||
);
|
||||
|
||||
SeedDMSTask.add = function(task) {
|
||||
tasks.push(task);
|
||||
return tasks.push(task);
|
||||
}
|
||||
|
||||
SeedDMSTask.run = function() {
|
||||
for(let task of tasks) {
|
||||
if(counter % task.interval == 0) {
|
||||
// console.log("Running task '" + task.name + "'");
|
||||
task.func();
|
||||
task.func(task);
|
||||
}
|
||||
}
|
||||
//console.log(counter);
|
||||
|
|
Loading…
Reference in New Issue
Block a user