-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 01/28/2014 07:25 AM, Jeryn Mathew wrote:
> I have a question regarding Pyramid application. > > In my use case, I create the Pyramid app using .make_wsgi_app() api, > and is then handed to gunicorn to start the server. My problem is, I > want to run a task/method once, AFTER the webserver is up. (ie, when > gunicorn/waitress/etc had started the pyramid app by calling its > .serve_forever()) > > Is there a hook or event in Pyramid webapp that is triggered when > webserver is up? What is the best practice in such a case? The application has no way of knowing that the server is started at all: nothing in the WSGI spec provides for such notification. In fact, it would be possible (if silly) to run your Pyramid webapp via a CGI-WSGI wrapper, with no main loop at all. Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlLn+GwACgkQ+gerLs4ltQ6ZKACdG9yOx2QaGvuMSfMNcyc8S2Zm VBQAnjssA8Mz/pO7lpFwr6EQtinBU8/8 =zJSC -----END PGP SIGNATURE----- -- You received this message because you are subscribed to the Google Groups "pylons-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-devel+unsubscr...@googlegroups.com. To post to this group, send email to pylons-devel@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-devel. For more options, visit https://groups.google.com/groups/opt_out.