bugfix
This commit is contained in:
parent
70b6b3de8f
commit
be28eba637
@ -1,3 +1,4 @@
|
||||
import asyncio
|
||||
from appPublic.worker import get_event_loop
|
||||
from fw.init import load_fastwhisper
|
||||
from ahserver.webapp import webapp
|
||||
@ -15,9 +16,15 @@ async def get_status(request, *args, **kw):
|
||||
ret = await env.fastwhister.get_status(env.params_kw.task_id)
|
||||
return ret
|
||||
|
||||
async def start_fw_server(*args, **kw):
|
||||
debug(f'start fastwhisper engine, {args=}, {kw=}')
|
||||
env = ServerEnv()
|
||||
asyncio.create_task(env.fastwhisper.run())
|
||||
debug('fastwhisper engine started ')
|
||||
|
||||
async def ahapp_built(app):
|
||||
env = ServerEnv()
|
||||
app.on_startup.append(env.fastwhisper.run)
|
||||
app.on_startup.append(start_fw_server)
|
||||
|
||||
def init():
|
||||
rf = RegisterFunction()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user