How can I minimise connections with django-celery when using CloudAMQP through dotcloud?

别来无恙 提交于 2019-12-22 09:58:18

问题


After spending a few weeks getting django-celery-rabbitmq working on dotcloud I have discovered that dotcloud is no longer supporting rabbitmq. Instead they recommend CloudAMQP. So I've set up CloudAMQP as per the tutorials:

  • http://docs.dotcloud.com/tutorials/python/django-celery/
  • http://docs.dotcloud.com/tutorials/more/cloudamqp/
  • http://www.cloudamqp.com/docs-dotcloud.html

And the service works fine. However, even when I do not have any processes running, CloudAMQP says there are 3 connections.

I had a look at their docs and they say (http://www.cloudamqp.com/docs-python.html) for celery it's best to set

broker_pool_limit = 1

I have now done this but the connections remain at 3. Any idea how I can

  • reduce the number of connections to 0 when the app is not in use?

  • minimise the number of connections to ensure that I remain within my quota?

来源:https://stackoverflow.com/questions/15741753/how-can-i-minimise-connections-with-django-celery-when-using-cloudamqp-through-d

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!