Groups
Groups
Sign in
Groups
Groups
pylons-discuss
Conversations
About
Send feedback
Help
uwsgi and forking
138 views
Skip to first unread message
Jonathan Vanasco
unread,
Aug 9, 2012, 5:10:39 PM
8/9/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pylons-discuss
I had some code that worked with Crypto and wasn't initially
compatible with uwsgi...
the fix was to call Crypto.Random's atfork() . thankfully uwsgi has a
post_fork_hook that made this simple
I don't always run under uwsgi though. does the implementation I used
below look okay - or does anyone know of a more pyramid-esque method ?
myapp/__init__.py
==============
try:
import uwsgi
from Crypto.Random import atfork
def post_fork_hook():
atfork()
uwsgi.post_fork_hook = post_fork_hook
except:
pass
==============
Reply all
Reply to author
Forward
0 new messages