mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-23 04:01:02 +02:00
Tidy endpoints, clean dispatch interface
This commit is contained in:
parent
a98aee7596
commit
cfa4cfa26b
4 changed files with 237 additions and 38 deletions
|
|
@ -63,17 +63,16 @@ class SocketEndpoint:
|
|||
running = Running()
|
||||
|
||||
print("Create...")
|
||||
print(self.dispatcher)
|
||||
dispinst = await self.dispatcher(ws, running, request)
|
||||
dispatcher = await self.dispatcher(ws, running, request)
|
||||
|
||||
print("Create worker...")
|
||||
worker_task = tg.create_task(
|
||||
self.worker(ws, dispinst, running)
|
||||
self.worker(ws, dispatcher, running)
|
||||
)
|
||||
|
||||
print("Create listener")
|
||||
lsnr_task = tg.create_task(
|
||||
self.listener(ws, dispinst, running)
|
||||
self.listener(ws, dispatcher, running)
|
||||
)
|
||||
|
||||
print("Created taskgroup, waiting...")
|
||||
|
|
@ -83,7 +82,7 @@ class SocketEndpoint:
|
|||
print("Task group closed")
|
||||
|
||||
# Finally?
|
||||
await dispinst.destroy()
|
||||
await dispatcher.destroy()
|
||||
|
||||
except ExceptionGroup as e:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue