-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Problem solved for now. My atexit.register() handler is now called
when I used pserve without --reload option. Using --reload cause
the handler being ignored.

Andreas

Luis Aguirre wrote:
> Hi Andreas,
> 
> You may capture signals from python to get the shutdown.  Using
> SIGINT is the most common way to stop an application gracefully.  You
> may see an example here:
> http://stackoverflow.com/questions/1112343/how-do-i-capture-sigint-in-python
> .
> 
> Best regards,
> 
> Luis Aguirre
> 
> 2013/1/25 Andreas Jung <[email protected] <mailto:[email protected]>>
> 
> 
> 
> Michael Merickel wrote:
>> WSGI is a pure request-level protocol, it does not handle or care
>> how it is served. As a result, a WSGI app (such as Pyramid) has no 
>> concept of when the service begins or ends.
> 
> As Zope veteran, I know :-) I am asking about the backend, not the
> WSGI level.
> 
>> The closest you'll get to this is a startup hook such as your
>> main() or ApplicationCreated for tracking the start.
> 
> ACK for the startup
> 
>> The other option is to hope that your server has hooks that can be 
>> used to track this. Finally, process state can be monitored 
>> externally via supervisor or some other process monitor.
> 
> I am still missing for the shutdown phase. Supervisord...is an
> option but I want to have something in my app. I tried using an
> atexit handler but it is never executed.
> 
> -aj
> 
> 
> -- You received this message because you are subscribed to the
> Google Groups "pylons-discuss" group. To unsubscribe from this group
> and stop receiving emails from it, send an email to
> [email protected] 
> <mailto:pylons-discuss%[email protected]>. To post to
> this group, send email to [email protected] 
> <mailto:[email protected]>. Visit this group at
> http://groups.google.com/group/pylons-discuss?hl=en. For more
> options, visit https://groups.google.com/groups/opt_out.
> 
> 
> 
> -- You received this message because you are subscribed to the
> Google Groups "pylons-discuss" group. To unsubscribe from this group
> and stop receiving emails from it, send an email to
> [email protected]. To post to this group,
> send email to [email protected]. Visit this group at
> http://groups.google.com/group/pylons-discuss?hl=en. For more
> options, visit https://groups.google.com/groups/opt_out.
> 
> 

- -- 
ZOPYX Limited         | Python | Zope | Plone | MongoDB
Hundskapfklinge 33    | Consulting & Development
D-72074 Tübingen      | Electronic Publishing Solutions
www.zopyx.com         | Scalable Web Solutions
- --------------------------------------------------
Produce & Publish - www.produce-and-publish.com


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJRAqFlAAoJEADcfz7u4AZj/qULwKNYlF/cTnOPmw78KZOX4Hap
t6EJH2aGFbqoMcsw8WOvAkyiqrT0VHDJBxYcUbOyhdeXY7lpB9S+GttG09wRuOdK
50+nu1LcchgsPL38ZHCrgJpHGagPDlKThH5SaUuI1akVq7EZwCfoTFGOGJWWuxcN
wplfQqFyHF+889ArSnhUwgOs2tCkaUMO5N7569TsU2/3TYv1NhajIop3Maw95hUu
9ygovVHfNhCMIXDe4B4A4GfmdLADbnOVUOoEVy+SkN3D3RvyGISXNV9NwKHa9B1k
zG3G2/ibmcwEmMVCOfIVZY4p19XrP81iZQ2mjPp8j/B9KNhmT4c1x9mE8gu3wAr8
E0yyc2gkrJh1Ol8p/yoEOtTNBqw06x7YBMU1RhI/bmjwWVI7VaMXQStqU7MPXUen
IJ5p4xuCb8Ui559vQd23q/3Pe26MK6jnMGOpftzVEh+CJQwz9TlwrAcqAaBkOZpn
kGkM95PC4NrZ/apsH4GrLVFe64dcapg=
=9h/i
-----END PGP SIGNATURE-----

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


<<attachment: lists.vcf>>

Reply via email to