if startFoo not in cherrypy.server.on_start_server_list:
cherrypy.server.on_start_server_list.append(startFoo)
if stopFoo not in cherrypy.server.on_stop_server_list:
cherrypy.server.on_stop_server_list.append(stopFoo)
If I can, I was thinking of putting the hooks in the
start-ProjectName.py file just after
start_server(Root())
??
I am building a reporting/monitoring mechanism and I'll be heavily
modifying scheduler.py, so I want to move a copy into my project and
refer to it as projectname.scheduler instead. Now I'm trying to
figure out how to mimic the tg code that handles autoreload.
thanks,
--
Jeff
Searching returned this message:
http://groups.google.com/group/turbogears/browse_thread/thread/e7fe18aadf6979da/bd5e928755a45f67?lnk=gst&q=controllers+package%0D%0Acontrollers+package&rnum=15#bd5e928755a45f67
Specifically,
"* The turbogears.startup now contains call_on_startup and
call_on_shutdown lists. You can append callables to these to have them
executed at the right time. "
So, the lists turbogears.startup.call_on_startup and
turbogears.startup.call_on_shutdown are your friends.
-Jeff