Created
June 25, 2020 19:30
-
-
Save guyroyse/19444c910546c9d84a0deedfb089b37e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import aioredis | |
from pprint import pp | |
async def main(): | |
redis = await aioredis.create_redis('redis://:foobared@localhost:6379/0', encoding='utf-8') | |
[channel] = await redis.psubscribe('bigfoot:broadcast:channel:*') | |
while True: | |
message = await channel.get() | |
pp(message) | |
asyncio.run(main()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment