[Zope3-Users] Executing code a server startup

Andreas Jung lists at zopyx.com
Mon May 18 00:46:12 EDT 2009


On 18.05.09 00:42, Simon Elbaz wrote:
> Hi,
> I am trying to execute some code at zope3 server startup. Zope3 posts
> hint using a  IProcessStartingEvent subscriber in configure.zcml.
>
> Here is an extract of configure.zcml:
>
> <subscriber
>       handler="cdcadama.authentication.onStartup"
>       for="zope.app.appsetup.interfaces.IProcessStartingEvent"
> />
>
> and the handler definition:
>
> def onStartup(event):
>        print 'hello'
>
> The problem is that the function is not called at server startup. But
> when a call to notify(zope.app.appsetup.interfaces.ProcessStarting())
> is made later  in the code (after the server starts), it prints 'hello'.
>
Isn't there a DatabaseOpened event?

-aj

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lists.vcf
Type: text/x-vcard
Size: 316 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope3-users/attachments/20090518/2b038ce7/attachment.vcf 


More information about the Zope3-users mailing list