Re: [Zope3-Users] server shutdown event

2007-01-08 Thread Stephan Richter
On Friday 01 December 2006 07:04, Shailesh Kumar wrote:
> Just want to confirm, is it the right way to do, or there is some better
> way to do things?

If you use twisted, this is a good way though we probably should have a 
shutdown event. Could you add this to the issue collector?

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] server shutdown event

2006-12-01 Thread Shailesh Kumar

Hi,

I wanted to do some cleanup activities during the time of server shutdown.
Couldn't find any particular event that is sent at that time. But looking
at: zope.app.main.main, i tried:

from twisted.internet import reactor

def shutdown():
 #shutdown code here.
  pass

reactor.addSystemEventTrigger('before',
   'shutdown', shutdown)

and this seems to work. (did this under an event handler for
DatabaseOpenedWithRootEvent).

Just want to confirm, is it the right way to do, or there is some better way
to do things?

With regards,
-Shailesh
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users