mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-22 03:31:02 +02:00
Stream kinda working
This commit is contained in:
parent
bba84dbe39
commit
3d307cfb89
5 changed files with 87 additions and 30 deletions
|
|
@ -26,10 +26,13 @@ class SocketEndpoint:
|
|||
|
||||
async def listener(self, ws, dispatcher, running):
|
||||
|
||||
print("In listener...!!!!!!!!!!!!!!!!!!!!")
|
||||
async for msg in ws:
|
||||
|
||||
# On error, finish
|
||||
print ("mt:", msg.type)
|
||||
if msg.type == WSMsgType.TEXT:
|
||||
print("YER!!!!!")
|
||||
await dispatcher.receive(msg)
|
||||
continue
|
||||
elif msg.type == WSMsgType.BINARY:
|
||||
|
|
@ -63,7 +66,9 @@ class SocketEndpoint:
|
|||
running = Running()
|
||||
|
||||
print("Create...")
|
||||
dispatcher = await self.dispatcher(ws, running, request)
|
||||
dispatcher = await self.dispatcher(
|
||||
ws, running, request.match_info
|
||||
)
|
||||
|
||||
print("Create worker...")
|
||||
worker_task = tg.create_task(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue