Closed EJH2 closed 4 years ago
Agree this is weird behavior. I'll look into it when testing and before the next release. Thanks!
added logic to only append if resultElement
is empty in https://github.com/czue/celery-progress/pull/45
@EJH2 can you close this once you confirm it's resolved in 0.11
?
This issue has been fixed for HTTP in 0.12, but it seems the change did not carry over to the websocket version.
Oops sorry! I don't actually have a websocket env.
I created this project a couple of months ago to test previous changes, but it still holds up well enough today as a development playground.
To reduce inconsistency between http and websocket they could have more code in common.
The data code (http, ws) can be a common function. The function could return data.complete
so the http client stops polling and the ws client closes the socket.
Better yet. Make CeleryProgressBar a class and CeleryWebSocketProgressBar a subclass that only overrides the connection code. If that sounds good, I have a branch for this and I can make a PR. Although I didn't test it yet.
That would make sense, as the Python backend for the websocket is a subclass of the http backend. If you could check this out, I would be unopposed to approving it!
That would make sense, as the Python backend for the websocket is a subclass of the http backend. If you could check this out, I would be unopposed to approving it!
done
As a result of this change in #31, an exception triggered in a task will appear in both the result and progress bar message elements using the default configuration. Running a task with the code
produces a progress bar as shown. It seems counter-intuitive to me to include the exception message in two places, especially since the result makes more sense in the result element than the progress bar area. That's my personal take on it, however. I'd be happy to hear your thoughts on this.