我正在运行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.