我在Celery日志中看到了这个错误:
Traceback (most recent call last):
File "/usr/local/myproject/.env/local/lib/python2.7/site-packages/celery/app/trace.py", line 434, in trace_task
uuid, retval, task_request, publish_result,
File "/usr/local/myproject/.env/local/lib/python2.7/site-packages/celery/backends/base.py", line 152, in mark_as_done
self.store_result(task_id, result, state, request=request)
File "/usr/local/myproject/.env/local/lib/python2.7/site-packages/celery/backends/amqp.py", line 129, in store_result
delivery_mode=self.delivery_mode,
File "/usr/local/myproject/.env/local/lib/python2.7/site-packages/kombu/messaging.py", line 169, in publish
compression, headers)
File "/usr/local/myproject/.env/local/lib/python2.7/site-packages/kombu/messaging.py", line 252, in _prepare
body) = dumps(body, serializer=serializer)
File "/usr/local/myproject/.env/local/lib/python2.7/site-packages/kombu/serialization.py", line 221, in dumps
payload = encoder(data)
File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/myproject/.env/local/lib/python2.7/site-packages/kombu/serialization.py", line 54, in _reraise_errors
reraise(wrapper, wrapper(exc), sys.exc_info()[2])
File "/usr/local/myproject/.env/local/lib/python2.7/site-packages/kombu/serialization.py", line 50, in _reraise_errors
yield
File "/usr/local/myproject/.env/local/lib/python2.7/site-packages/kombu/serialization.py", line 221, in dumps
payload = encoder(data)
File "/usr/local/myproject/.env/local/lib/python2.7/site-packages/kombu/serialization.py", line 350, in pickle_dumps
return dumper(obj, protocol=pickle_protocol)
EncodeError: can't pickle traceback objects
但是,它没有列出Celery任务。我假设某个任务正在抛出异常,然后Celery尝试捕获并序列化回溯作为任务结果,这是不受支持的,然后抛出这个额外的异常,但没有任务名称,怎么做我发现了潜在的问题?
我正在使用芹菜== 4.1。