Celery Worker Database Connection Pooling

前端 未结 6 1028
萌比男神i
萌比男神i 2020-12-07 19:17

I am using Celery standalone (not within Django). I am planning to have one worker task type running on multiple physical machines. The task does the following

    <
6条回答
  •  忘掉有多难
    2020-12-07 20:03

    Perhaps, celery.concurrency.gevent could provide the pool sharing and not aggravate the GIL. However, it's support is still "experimental".

    And a psycopg2.pool.SimpleConnectionPool to share amongst greenlets (coroutines) which will all run in a single process/thread.

    Tiny bit of other stack discussion on the topic.

提交回复
热议问题