2013-03-23 27 views
0

我正在使用Celery current_task更新任务进度。它在99%的时间内工作,然后将无限期地挂起。与RabbitMQ的后端芹菜3.0.x的Python芹菜Task.update_state可能永远阻止

current_task.update_state(state=state, 
      meta= { 'progress' : progress }) 

[UPDATE]

所以似乎存在于芹菜AMQP后端发生死锁,

def _store_result(self, task_id, result, status, traceback=None): 
    """Send task return value and status.""" 
    with self.mutex: 
     with self.app.amqp.producer_pool.acquire(block=True) as pub: 
      .......... 

调查的溶液

回答

0

貌似这是kombu连接池限制的问题,能够通过增加broker_pool_limit从默认值

来解决此问题
BROKER_POOL_LIMIT=100