-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
very simple codes can't execute,why? #8996
Comments
@broadcast98 by checking your output i could see that you haven't started the celery instance in order for the python client to use it. This is the proper way to run it:
This worked out fine. |
thank you . |
To answer you question:
Hope this clarifies your doubt !! :) |
The 'task.py' in the previous question was a typographical error. The actual name of my file is 'tasks.py'. I have tried the entire process again, and now I am posting the complete error message here: tasks.py
test_client.py
error message:
and I use below code to view task result:
the result is:
|
@broadcast98 in the celery instance output i could see that the tasks.hello is being received. Along side the output for the test_viewresult is showing pending. could u run the also in the celery instance output i have noticed this:
the result backend url is not correct or have u edited it out to hide the details? |
@broadcast98 also i have modified the test_client.py and test_viewresult.py into this and is working fine:
This worked fine and i got the details as below:
also in you tasks.py, add this too:
This can be useful for ensuring that the Celery worker can establish a connection to the message broker upon startup, especially in scenarios where the message broker might not be immediately available. |
tasks.py
test_client.py
error message:
os: windows 10
python version: 3.12
redis_version:5.0.14.1
I can't find any wrong in the codes.
so what caused the TimeoutError?
The text was updated successfully, but these errors were encountered: