Description
Hello
My config file is
result_backend = 'redis://localhost:6379/0'
broker_url = "amqp://guest:guest@localhost:1928//"
my celery version is 5.1.2 (sun-harmonics)
my python version is 3.9.5
this is my task
@app.task(bind=True)
def prt(self):
print("Yes im alive")
if randint(0,1):
self.update_state(
state = states.FAILURE,
meta = 'Test'
)
else:
self.update_state(
state = states.SUCCESS,
meta = 'Test'
)
first problem when i run this taks in group result i seem something unknown error (command executed successfully i guess)
[2022-03-28 15:41:17,651: ERROR/MainProcess] Pool callback raised exception: AttributeError("'str' object has no attribute 'get'")
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/billiard/pool.py", line 1796, in safe_apply_callback
fun(*args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/celery/worker/request.py", line 571, in on_failure
self.task.backend.mark_as_failure(
File "/usr/local/lib/python3.9/dist-packages/celery/backends/base.py", line 171, in mark_as_failure
self.store_result(task_id, exc, state,
File "/usr/local/lib/python3.9/dist-packages/celery/backends/base.py", line 482, in store_result
self._store_result(task_id, result, state, traceback,
File "/usr/local/lib/python3.9/dist-packages/celery/backends/base.py", line 903, in _store_result
current_meta = self._get_task_meta_for(task_id)
File "/usr/local/lib/python3.9/dist-packages/celery/backends/base.py", line 928, in _get_task_meta_for
return self.decode_result(meta)
File "/usr/local/lib/python3.9/dist-packages/celery/backends/base.py", line 384, in decode_result
return self.meta_from_decoded(self.decode(payload))
File "/usr/local/lib/python3.9/dist-packages/celery/backends/base.py", line 380, in meta_from_decoded
meta['result'] = self.exception_to_python(meta['result'])
File "/usr/local/lib/python3.9/dist-packages/celery/backends/base.py", line 337, in exception_to_python
exc_module = exc.get('exc_module')
AttributeError: 'str' object has no attribute 'get'
second thing i did not receive any result in groupresult.restore with sqlite3 resultbackend i change my result backend to redis and i faced with this
thank you and have good day