probably fixed #5, need more testing
This commit is contained in:
@@ -2,7 +2,7 @@ import asyncio
|
||||
import base64
|
||||
import pickle as pkl
|
||||
import uuid
|
||||
from threading import Thread
|
||||
from threading import Lock, Thread
|
||||
|
||||
import fastapi
|
||||
from uvicorn import Config, Server
|
||||
@@ -31,6 +31,8 @@ class _Router:
|
||||
"""
|
||||
Method which queries an available task and sends the data to the attached runner.
|
||||
"""
|
||||
l = Lock()
|
||||
l.acquire()
|
||||
await wsConnection.accept()
|
||||
await wsConnection.send_text(str(self.runnerCount))
|
||||
methods = await wsConnection.receive()
|
||||
@@ -41,6 +43,7 @@ class _Router:
|
||||
runnerID = self.runnerCount
|
||||
self.runnerCount += 1
|
||||
runnerCounter = 0
|
||||
l.release()
|
||||
try:
|
||||
while True:
|
||||
# add this id back into available id pools using a shared list.
|
||||
|
||||
Reference in New Issue
Block a user