Hi Alessandro,

By investigationg with Bastien about threading in turbogears, we found that tgext.asyncjob worker thread is not stopped gracefully. (the code includes a raw "while True".
Would you be interested in us to implement a gracefull stop of the thread ?

Currently in case of long-term asynchronous operations (especially writing in database), this may result in dirty/unexpected data/behavior.

If so, where is the original repo of tgext.asyncjob ? https://bitbucket.org/axant/tgext.asyncjob ?


Damien


Le 30/05/2016 à 22:39, Alessandro Molina a écrit :
Usually the best way to achieve this is:

- Through the environment_loaded milestone if you need it to happen once per process ( http://turbogears.readthedocs.io/en/latest/turbogears/configuration/appconfig.html#configuration-milestones ) - Through the configure_new_app hook if you need it to happen once for each TG application created by a process ( http://turbogears.readthedocs.io/en/latest/turbogears/hooks.html#available-hooks )

On Mon, May 30, 2016 at 10:00 AM, Bastien Sevajol <[email protected] <mailto:[email protected]>> wrote:

    Hi,

    I need to execute code once my application is itilialized and
    ready to use (auth methods usage, etc).
    Place my code
    in tg.configuration.app_config.AppConfig#after_init_config is
    right place ?

    To expose my situation: I want to launch in subprocess, a radicale
    server instance who use my app auth methods.

    Thank's,
    Bastien.
-- You received this message because you are subscribed to the Google
    Groups "TurboGears" group.
    To unsubscribe from this group and stop receiving emails from it,
    send an email to [email protected]
    <mailto:[email protected]>.
    To post to this group, send email to [email protected]
    <mailto:[email protected]>.
    Visit this group at https://groups.google.com/group/turbogears.
    For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "TurboGears" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To post to this group, send email to [email protected] <mailto:[email protected]>.
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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 https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.

Reply via email to