stabilize async loops
This commit is contained in:
1 parent
d934dc0ef7
commit
c71b0a9642
2 files changed
-5
No files matched your search
@@ -6,7 +6,6 @@ from quart_auth import (
|
||||
import time
|
||||
import json
|
||||
import asyncio
|
||||
import nest_asyncio
|
||||
import traceback
|
||||
from stream import Stream
|
||||
from tool import ToolSpec, ToolParameter
|
||||
@@ -27,8 +26,6 @@ def encode_json(value):
|
||||
return json.dumps(value, default=encode_unknown)
|
||||
|
||||
async def start_server(app):
|
||||
nest_asyncio.apply()
|
||||
|
||||
server = Quart(__name__, static_folder=frontend_path)
|
||||
server.secret_key = 'horde-secret'
|
||||
auth_manager = QuartAuth(server, mode="bearer")
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import asyncio
|
||||
import nest_asyncio
|
||||
|
||||
id_counter = 0
|
||||
|
||||
@@ -59,7 +58,6 @@ class Stream:
|
||||
app.streams[self.id] = self
|
||||
|
||||
def listen (self, chunk_fn, end_fn):
|
||||
nest_asyncio.apply()
|
||||
chunk_fn = make_runnable(chunk_fn)
|
||||
end_fn = make_runnable(end_fn)
|
||||
|
||||
|
||||
Reference in new issue
Block a user