Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

CELERY_TRACK_STARTED breaks get() #49

Open
geoffjukes opened this issue Mar 14, 2015 · 2 comments
Open

CELERY_TRACK_STARTED breaks get() #49

geoffjukes opened this issue Mar 14, 2015 · 2 comments

Comments

@geoffjukes
Copy link

Hi,

After much head scratching, I finally figured out why my 'get' was not returning results.

It turns out that ff the Celery worker is configured with

CELERY_TRACK_STARTED = True
CELERY_RESULT_BACKEND = 'amqp'

the task status changes to 'STARTED', but never moves to ''SUCCESS'. (at least for me!). So using .get() never returns a result

Changing to

CELERY_TRACK_STARTED = False

and switching to PHP AMQP implementation (so that I can expire the results), solved all my headaches.

Thanks for a very useful script!

@gjedeer
Copy link
Owner

gjedeer commented Mar 16, 2015

Nice catch.
For now I just added this to readme: 4049a60
I'll leave this bug open, will try to figure it out next time I have time to work on this library.

@kevinlondon
Copy link

One other note that may be useful to include in the README is the CELERY_RESULT_BACKEND setting recommendation. Otherwise, it seems like failures don't report quite as you'd expect (took me a bit to figure out...). My tasks would just wait forever if I was polling them for a change since the result wasn't recorded.

smuuf added a commit to smuuf/celery-php that referenced this issue Aug 28, 2020
Also, if the state is not one of the READY_STATES (as defined in Celery
source), do not block fetching new results from result backend.

See gjedeer#49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants