-
Notifications
You must be signed in to change notification settings - Fork 23
feat: Add get_progress and set_progress to redis result backend #67
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
1424f59
to
c3d7b5a
Compare
A few questions about this:
I also note that there's a fair bit of duplication in RedisAsyncClusterResultBackend, RedisAsyncResultBackend, and RedisAsyncSentinelResultBackend. They could possibly be refactored to have a common base class with most of the implementation, and the subclass just defining a method that provides the redis connection object as a resource (i.e. with enter() and exit() even if it's not strictly necessary). That refactor is beyond the scope of this PR, but I'm happy to do it. CC @Sobes76rus as you did the original set_/get_progress implementation |
Hello, I think the |
OK so should I add 2 more arguments to the result backend(s) constructor?
I'm happy to add that to this PR, if @s3rius gives a 👍. The bit I'm least confident about is the 600 default - it's a little arbitrary, but I think some default is better than no expiry. My rationale is that if there have been no progress updates in the last 10 minutes, something has probably gone wrong. |
FYI I believe I've fixed the build now, sorry about missing that in the first PR! |
@s3rius it would be great to get your input on this, if you have any? :) |
Hey, just giving this a nudge. I'm running my project on a fork so no great hurry, although it would be good to know if you're on board with the direction I took? |
It looks good to me. Let's check tests and release it if it's fine. |
Can you please rebase onto the |
Uses as standard suffix on the redis key (hardcoded as "__progress") to store progress results
c3d7b5a
to
8a97ced
Compare
done |
Any ETA on this? |
Uses as standard suffix on the redis key (hardcoded as "__progress") to store progress results.