Sorry to rehash this topic, this is critical to me and eventually to you.

Scheduler in web2py works great. 
What I need is to access the workers asynchronously and invoke methods on 
it so that I can pause/resume/abort them and check on its level of progress.

Any ideas on this?

Thank you

On Saturday, 11 February 2012 18:59:43 UTC, blackthorne wrote:
>
> Massimo: 
> For instance, I created a method that returns the progress of the task 
> that I am running 
> I guess my questions could collapse into this example: 
>
> Consider, 
> in a db file 
>
> def plugin_run(plugin, **kw): 
>     plugin_obj = load_plugin(plugin, **kw) 
>     plugin_obj.start() 
>     return plugin_obj.report() #this shall be a dictionary for 
> appearing in results properly 
>
> myscheduler = Scheduler(db_tasks, dict(plugin_run=plugin_run)) 
>
> Eventually that plugin_obj will be picked up by a worker... 
> now, that it is running it is taking a lot of time and I wanted to do 
> something like.. 
> from db_scheduler_worker where it is running task with 
> task_name="demo" 
> call "plugin_obj.progress()" defined inside 
>
>
>
>
>
> On Feb 10, 5:39 pm, Massimo Di Pierro <massimo.dipie...@gmail.com> 
> wrote: 
> > Not sure I understand. You do not call scheduled_workers functions. 
> > You schedule tasks. Workers pick them up from queue an execute them 
> > using the available power. 
> > 
> > On Feb 10, 4:54 am, blackthorne <francisco....@gmail.com> wrote: 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > > - Is it possible to call scheduled_workers functions asynchronously? 
> > > How? 
> > > - How should I adapt the behavior of a scheduled_worker as changing 
> > > its model and adding new functionality? 
> > 
> > > Thank you

Reply via email to