Hi,
I have more than 10 functions which has to be executed by Scheduler and
each task has assigned different time ( for e.g...one has to execute on
every 15 minutes, other one has to executes on every 24 hrs etc... ) to
execute, so in my CustomScheduler.py module : I wiil have 10 different
statements like below:
db.scheduler_task.validate_and_insert(
function_name='func1',
args='[]',
repeats = 0, # run indefinately
period = 3600, # every 1h
timeout = 120, # should take less than 120 seconds
)
db.scheduler_task.validate_and_insert(
function_name='func2',
args='[]',
repeats = 0, # run indefinately
period = 900, # every 15 min
timeout = 120, # should take less than 120 seconds
)
My doubt is what will be the better optimized approach to assign those 10
tasks to Scheduler:
1. Create only one worker using *web2py -K appname* command for all tasks,
which will further takes care of running all tasks at designated time OR
2. Create 10 different workers means execute above command 10 times and
then web2py takes care of assigning the task to each worker.
which will be the best optimized way to use web2py scheduler?
Regards,
Amit
--