Re: [web2py] Re: Pattern to run async proccess

2013-02-02 Thread José Luis Redrejo Rodríguez
I've been studying the scheduler, but I think it fails in one of the things I need: The web page must be updated as the process is being done i.e. if the scheduler is doiing some background task, I need to update the web page with the progress of the task, but I don't find how to do it with the

Re: [web2py] Re: Pattern to run async proccess

2013-02-02 Thread Niphlod
you must save somewhere in your long_time_consuming_function() the progress and let the page show that. If you manage that function outside web2py (using the scheduler or not), you need something readable by your page and writeable by the external process. A record on the db, a file,

Re: [web2py] Re: Pattern to run async proccess

2013-02-02 Thread José Luis Redrejo Rodríguez
Niphlod Thanks very much , your learn by trial application has been gold for me. Catched!! 2013/2/2 Niphlod niph...@gmail.com: you must save somewhere in your long_time_consuming_function() the progress and let the page show that. If you manage that function outside web2py (using the

Re: [web2py] Re: Pattern to run async proccess

2013-02-02 Thread Bruno Rocha
You can also use Redis Queue http://rochacbruno.com.br/web2py-and-redis-queue/ -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to

[web2py] Re: Pattern to run async proccess

2013-02-01 Thread Massimo Di Pierro
All that you ask can be done using the scheduler except that your app does not start the process, but submits a request to the scheduler. The scheduler runs the app when a worker is available. This is to prevent spikes in resource utilization when multiple processes start. The task can

Re: [web2py] Re: Pattern to run async proccess

2013-02-01 Thread José Luis Redrejo Rodríguez
Thanks for your advice Massimo, but does the scheduler start inmediately when no worker has been used before? 2013/2/1 Massimo Di Pierro massimo.dipie...@gmail.com: All that you ask can be done using the scheduler except that your app does not start the process, but submits a request to the

Re: [web2py] Re: Pattern to run async proccess

2013-02-01 Thread Massimo Di Pierro
yes. If the worker is not busy it starts the task immediately. You can also have more than one worker. On Friday, 1 February 2013 11:10:11 UTC-6, José Luis Redrejo Rodríguez wrote: Thanks for your advice Massimo, but does the scheduler start inmediately when no worker has been used before?