-
Notifications
You must be signed in to change notification settings - Fork 91
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
introducing KnownResult for WS #52
Conversation
…hing to a homegrown and more performant solution here
…mewhere internally to not break the entire system
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like you built this off of master, so I will have to re-do all of the proposed changes from #51 to incorporate this, which may complicate merging either.
I merged the PRs. There's an issue when retrying tasks because Progress.get_info returns an exception instead of a dictionary. For HTTP it's not relevant to the PR (#53). For WS, I'm not sure. On master, On this branch, the post handler does not run. I'm not sure why. Celery logs this:
|
There seems to be a previously undiscovered edge-case involving retries right now, as well as ignored tasks. The signal error is most likely because the Retry error that celery throws cannot be serialized by JSON. It seems that |
I don't think I intended that to be the error, rather it was a small oversight that the Progress dictionary gets unpacked and re-packed in another dictionary object, versus just serving up the same dictionary. Removing the dictionary unpack would change the error to EDIT: I've pushed a commit removing the dictionary unpack to be more in line with the HTTP view |
@EJH2 happy to let you handle review of this one since it is most relevant to your recent work. |
@EJH2 done I made |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Only nitpick I have is using double quotes for docstrings vs single quotes. Otherwise, this is good to go for a merge.
Will do. Want to get #57 in and then will push to pypi (everything else looking good on my side) |
Just released 0.0.13! https://pypi.org/project/celery-progress/0.0.13/ As an aside... I think maybe I'll start changing the release versions to 0.1, 0.2 moving forwards... maybe we can even get to 1.0! 🙃 |
FYI I somehow botched the packaging on 0.0.13, so released a fixed 0.0.14. 🤦♂️ |
Following from #51.
This is one way for the WS backend to avoid
AsyncResult
but still useProgress.get_info
.Progress.get_info
can take either anAsyncResult
or aKnownResult
. WS code would use aKnownResult
.If this is ok, it should be tested with #51 before merging.