Skip to content

Instantly share code, notes, and snippets.

@akhil-reni
Created October 28, 2021 04:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akhil-reni/9b8b8484a8ea0e13a635e41b2d604b99 to your computer and use it in GitHub Desktop.
Save akhil-reni/9b8b8484a8ea0e13a635e41b2d604b99 to your computer and use it in GitHub Desktop.
Making Django ORM Gevent safe inside celery
from gevent import monkey
from psycogreen.gevent import patch_psycopg
monkey.patch_all(httplib=False)
patch_psycopg()
import mainApp.celery
from mainApp.celery import app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment