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 pylons-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
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.
The problem I was facing (there might be others) that you cannot fork process after SQLAlchemy pool is set up.