This repository has been archived by the owner on Feb 21, 2023. It is now read-only.
Pubsub run as coroutine in background. (aioredis-py 2.0) #1123
Unanswered
JamalRahman
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all, I'm comfortable using the regular redis-py module, and I'm a bit weak with async programming in general. I'm struggling with using pubsub.run() instead of redis-py's pubsub.run_in_thread(). The docs and tests aren't clear to me how to adapt it in my use case.
I'm looking for the async parallel to the below
We simply launch a background task to continuously listen to & handle events, for as long as the app runs. I can't work out how to translate that into the new aioredis workflow.
Of course, I can just go with the threaded version above.. I'm just curious as the rest of the API is async I'd rather do it "properly".
Beta Was this translation helpful? Give feedback.
All reactions