Skip to content

Instantly share code, notes, and snippets.

@mjumbewu
Created June 9, 2016 21:13
Show Gist options
  • Save mjumbewu/127368f7dc810dd37fe18aee87dd2ee2 to your computer and use it in GitHub Desktop.
Save mjumbewu/127368f7dc810dd37fe18aee87dd2ee2 to your computer and use it in GitHub Desktop.
Patching psycopg2 for nonblocking use with gunicorn's gevent workers using psycogreen
from psycogreen.gevent import patch_psycopg
def post_fork(server, worker):
patch_psycopg()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment