我正在运行 Celery 和 django-celery 的最新稳定版本。我已经定义了一个任务,它传递一个主键,获取与该键关联的对象,然后处理它。当我直接调用该函数时,这一切都很好,但是当我将消息放入队列(MongoDB)时,工作人员在访问数据库时失败(带有附加的堆栈跟踪)。有没有其他人遇到过这个问题?
[2012-05-04 12:01:23,673: INFO/MainProcess] Got task from broker: app.tasks.process_model[71934fab-b3a2-4847-bb3e-00484d77c6c7]
[2012-05-04 12:01:25,202: INFO/PoolWorker-4] child process calling self.run()
[2012-05-04 12:01:35,618: ERROR/MainProcess] Task coupons.tasks.queue_print_image[71934fab-b3a2-4847-bb3e-00484d77c6c7] raised exception: WorkerLostError('Worker exited prematurely.',)
Traceback (most recent call last):
File "/Users/<user>/Envs/cf/lib/python2.7/site-packages/celery/concurrency/processes/pool.py", line 634, in _join_exited_workers
raise WorkerLostError("Worker exited prematurely.")
WorkerLostError: Worker exited prematurely.