Do I need a call to monkey.patch_all () in a Django + Gunicorn + GEvent + Boto structure?

My site uses Django + Gunicorn + GEvent. There is a function that I have to use Boto for DynamoDB.

Do I need to call monkey.patch_all () to make Boto green?

+2
source share
1 answer

If you use the default configuration of worker_class , then you do not have gevent functions. Check out the document here . I think that you do not have the advantage of using gevent when you use the default configuration, even if you monkey patch everything.

So, you must configure gunicorn to use GeventWorker , which performs the operation monkey.patch_all() , and in this situation, I think that you do not need to completely neutralize the patches. Here is the GeventWorker source code and the worker_class document

+2
source

All Articles