mirror of
https://github.com/storytold/EventCenterPlugin.git
synced 2026-10-09 00:09:42 +00:00
changed channels
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user