Skip to content

Some new error with redis result backend #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
arashm404 opened this issue Mar 28, 2022 · 0 comments
Closed

Some new error with redis result backend #12

arashm404 opened this issue Mar 28, 2022 · 0 comments

Comments

@arashm404
Copy link

arashm404 commented Mar 28, 2022

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')
Screen Shot 1401-01-08 at 18 16 39

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
Screen Shot 1401-01-08 at 18 18 37

thank you and have good day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant