Skip to content
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

The celery result has different task meta-id in different nodes of redis cluster. Accessing via the same id, without knowing which node has it, would give MOVED error. How can I have the same result distributed and available to all nodes? #6

Open
harryz2016 opened this issue Jul 8, 2024 · 0 comments

Comments

@harryz2016
Copy link

harryz2016 commented Jul 8, 2024

I managed to connect the package to my redis cluster. The celery worker is able to pick up tasks from rabbitMQ and send result to Redis Cluster. However, the result has different task meta-id in different nodes of redis cluster. Accessing via the same id would give MOVED error.

Here is the Redis-cli log:
127.0.0.1:7000> get celery-task-meta-086d27bd-fcd0-423c-9e32-1a677c30dfbb
"{"status": "SUCCESS", "result": "hello Harry", "traceback": null, "children": [], "date_done": "2024-07-08T13:02:16.663910", "task_id": "086d27bd-fcd0-423c-9e32-1a677c30dfbb"}"

127.0.0.1:7001> get celery-task-meta-086d27bd-fcd0-423c-9e32-1a677c30dfbb
(error) MOVED 2614 127.0.0.1:7000

127.0.0.1:7001> KEYS *

  1. "celery-task-meta-409218df-e78a-4a11-9357-403463fe1212"
  2. "celery-task-meta-408ac78b-4e4e-45ca-94e0-f28bbcc7b5b1"
  3. "celery-task-meta-0bfef6f4-db1a-49f6-bc1a-4f9402111302"
    127.0.0.1:7001> GET celery-task-meta-0bfef6f4-db1a-49f6-bc1a-4f9402111302
    "{"status": "SUCCESS", "result": "hello Harry", "traceback": null, "children": [], "date_done": "2024-07-08T13:01:37.958727", "task_id": "0bfef6f4-db1a-49f6-bc1a-4f9402111302"}"

How can I have the same result distributed and available to all nodes?

@harryz2016 harryz2016 changed the title The celery result is only in one node of the redis cluster. How can I have that result distributed and available to all nodes? The celery result has different task meta-id in different nodes of redis cluster. Accessing via the same id, without knowing which node has it, would give MOVED error. How can I have the same result distributed and available to all nodes? Jul 8, 2024
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