Here are the available events in Pyramid.

http://docs.pylonsproject.org/projects/pyramid/en/latest/api/events.html#pyramid.events.ApplicationCreated

On Tue, Jan 28, 2014 at 1:30 PM, Gael Pasgrimaud <g...@gawel.org> wrote:
> On Tue, Jan 28, 2014 at 04:25:14AM -0800, Jeryn Mathew wrote:
>> Hello all,
>>
>> 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?
>>
>
> I don't think there's one in pyramid. Your app is not notified when the server
> is ready.
>
> If you're using gunicorn you may use one of its server hooks:
>
> http://docs.gunicorn.org/en/latest/settings.html#server-hooks
>
>>
>> Many thanks in advance,
>> Jeryn Mathew
>>
>> --
>> 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.
>
> --
> 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.

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

Reply via email to