I recently had to update our production deployment to address a forking 
issue with mongodb, and realized that our "post fork" cleanup routine was 
built directly against the uWSGI API -- creating some technical debt.

The solution was a new library that I'd appreciate feedback on: 
`pyramid_forksafe` 

The library allows you to write a postfork routine against the generic 
event `pyramid_forksafe.events.ApplicationPostFork` -- which is invoked 
with the application's current `registry`.  Changing between containers can 
then be addressed within the deployment configuration, so you don't need to 
touch the application code.

It appears to work fine with uWSGI and gunicorn so far.  I'm not quite sure 
how to handle the tests or other servers, so PRs/comments are welcome.

https://github.com/jvanasco/pyramid_forksafe

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/ef8d9b12-8ebf-4a42-95a5-7a608a851049%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to