Skip to content
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

Changed redis backend to use aioredis instead of asyncio_redis. #8

Open
wants to merge 2 commits into
base: master
from

Conversation

@hramezani
Copy link
Contributor

@hramezani hramezani commented Feb 27, 2020

Based on @tomchristie comment.

I have added await self._wait_for_channel(), to wait for the channel.

await self._pub_conn.publish(channel, message)
await self._pub_conn.publish_json(channel, message)

async def _wait_for_channel(self) -> None:

This comment has been minimized.

@Woile

Woile Feb 27, 2020
Contributor

I would try to find a way to avoid this. With async-redis it was possible, so I guess it should be possible to do it with aioredis, what do you think?

This comment has been minimized.

@hramezani

hramezani Feb 28, 2020
Author Contributor

Thanks, @Woile. It would be good to find a solution because we have the same problem in redis-stream backend.

Maybe we need to change the way of subscription on the base class. what do you think?

This comment has been minimized.

@hramezani

hramezani Mar 8, 2020
Author Contributor

I have moved listener_task creation from connect to subscribe. now we don't need the _wait_for_channel function.

@hramezani hramezani force-pushed the hramezani:change_redis_backend branch from cac3b42 to dbef3c3 Mar 8, 2020
@hramezani hramezani changed the title Changed redis backend to use asyncio-redis instead of asyncio_redis. Changed redis backend to use aioredis instead of asyncio_redis. Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.