[web2py] Re: Fun with Scheduler

2013-06-05 Thread Joe Barnhart
I'll see if I can abstract a simple example. The concept is... I load a big file into the system and call module1.task-A to process it. This is an unzip task and it bursts the large file into 50 smaller ones that each need to be scheduled with module2.task-B for processing. So you go from the

[web2py] Re: Fun with Scheduler

2013-06-05 Thread Niphlod
uhm. inserting things like this can end up with undesired side-effects (i.e. inserting args "printed as a list"). First things first, you should leverage the queue_task API. As for "let's try to figure out what function name will be valid", please test the functionality before "by hand" and then

[web2py] Re: Fun with Scheduler

2013-06-05 Thread paolo betti
I agree Scheduler is great. I use this technique: in modules/lib.py: def a_func(db): # some code # ... return in models/scheduler.py def a_func(): import lib return lib.a_func(db) from gluon.scheduler import Scheduler scheduler = Scheduler(db) in controllers/a_controlle