changed channels

This commit is contained in:
Brandon Thomas
2021-02-25 05:25:50 -05:00
parent d37c415d62
commit adb459e657
+10 -1
View File
@@ -58,6 +58,12 @@ asyncio.get_event_loop().run_forever()
from aioredis.pubsub import Receiver
from aioredis.abc import AbcChannel
CHANNELS = [
'vocode',
'spawn',
'testing',
]
print('defining server', flush=True)
@@ -87,7 +93,10 @@ async def server(websocket, path):
redis = await aioredis.create_redis_pool('redis://localhost')
await redis.subscribe(mpsc.channel('channel:1'), mpsc.channel('channel:testing'), mpsc.channel('testing'))
#await redis.subscribe(mpsc.channel('channel:1'), mpsc.channel('channel:testing'), mpsc.channel('testing'))
channels = [mpsc.channel(ch) for ch in CHANNELS]
await redis.subscribe(*channels)
print('starting websocket server', flush=True)
try: