List Info

Thread: Running Scheduled functions in Cherrypy




Running Scheduled functions in Cherrypy
user name
2006-03-15 17:23:58
Rob Cowie wrote:
> Thanks, I'll take a look at it.
> 
> I was beginning to go mad trying to get the sched
module to do what I
> want. I've never used it before but it certainly seems
to be 
> one of the
> weakest members of the python standard library.
> 
> I'll let you know how I get on with recur. One thing
that I might need
> some help with is where to incorporate it in my server.

> Should it be in its own thread? etc.

Each Worker object will start those separate threads for you
when you
call its "motivate" method. 


Robert Brewer
System Architect
Amor Ministries
fumanchuamor.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://
groups.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---

Running Scheduled functions in Cherrypy
user name
2006-03-29 14:23:21
Well recur works a treat!

However.... I have one remaining problem.

On cherrypy server startup, I call a function that creates a
custom
recur.Worker object and calls its .motivate() method. A new
thread is
spawned and the worker does its thing when required.

I had assumed that when I kill the cherrypy server, all
threads spawned
by it would be killed as well. This is not the case. So, I
added a
function that should call the .stop() function of my worker
object.

Is this enough to kill the thread? Currently, when I kill
cherrypy at
the command line with cmd-C, I am not returned to a shell
prompt as a
thread is still running.

I'd appreciate any help!

Rob C


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://
groups.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---

Running Scheduled functions in Cherrypy
user name
2006-03-29 14:51:08
On 3/29/06, Rob Cowie <cowie.robgmail.com> wrote:
> Is this enough to kill the thread? Currently, when I
kill cherrypy at
> the command line with cmd-C, I am not returned to a
shell prompt as a
> thread is still running.

I believe that thread will die when the timer fires.

Kevin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://
groups.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )