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

Poll task resturns SUCCESS, but no results #10

Open
duncanwilson opened this issue Jul 28, 2017 · 4 comments
Open

Poll task resturns SUCCESS, but no results #10

duncanwilson opened this issue Jul 28, 2017 · 4 comments

Comments

@duncanwilson
Copy link

Intermittently, when you poll a submitted task in javascript, when it returns as status: SUCCESS the results are not listed.

This seems to occur most often when the task poll is done immediately after the POST to the celery queue.

However, it has happened other times, such as when I have the poll on a repeated loop if status=PENDING ... then re-poll after a wait period, for example. If I re-poll every 100 ms, then periodically I will see this problem pop up.

@mbstacy
Copy link
Member

mbstacy commented Oct 31, 2018

@duncanwilson I have also noticed this type of behavior. Also, sorry for the delay in responding to this issue. I'm currently planning to update celery application and API code. The API code definitely needs to be updated. The problem is that the task is finishing before the results are stored within the tombstone in the database(mongo). The status of the task "SUCCESS" but tombstone(results) are not available within the database. I really don't want to introduce code that will wait for results. @tdpearson Two options: 1. add code to wait for a second 2. Have frontend poll for results. Thoughts?

@tdpearson
Copy link
Member

@mbstacy I would rather wait until the backend is updated to see if it resolves the timing issue than add latency to the whole system right now. As a work around until that happens, polling with error handling on the frontend would be my recommendation.

@jduckles
Copy link
Contributor

Since the beginning I've thought opening a WebSocket might be a better thing than polling here.

@tdpearson
Copy link
Member

I am not convinced that websockets is the solution here. However, it would be a great alternative to polling. I have seen Django Channels picking up speed.

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

4 participants