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]>

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
>
> 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
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQGUBAEBAgAGBQJRAkYjAAoJEADcfz7u4AZjVT8LwJHlrJygPxj/Ro3UOS0W6BNO
> aJM+4T0Eg9hyMxhBOiHgBhY3rmJlRQYWvpH8zvlFMLbXaTU4bT+Ez2xxIiNhJDRx
> 6RMt3+YiVOC5Ab703tG9KGSIDELEHtJicXE6RVBDEHWD7wFFXOBD/lfDgTbe8Blq
> ZBgP3QVXHJL5sRkaYbRnUIpNbWnoXh5mYsRVHaZgiSilG7LReS6Ru+njSQ2y+4oy
> s70GtNqFj/edm+coJd1dLxbyZxvo98gXLyNpxN4ZpYCkCDEtq/7glx2bEGgJLieV
> pVNs6byRRQeJIvsUd9tNOpkBVPLAXM98pHRfvkSXCqV4sGJz9auPzxacu8kr2On5
> w3jAQ970jrer+avgt3S7AhQRDCeq+Ww+m2OPuRJQwmPDgs2RiIUYg6XoP1MDm0ds
> kU1UX98a4qWkmV5CXGLGProii6edQpE2GFOooZi6jZcNtvrJrVK7E7RXRZlfnu5q
> xLllNy/mMApsKaPqkfbyoroPqg6GrJc=
> =FSG7
> -----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.
>
>
>

-- 
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.


Reply via email to