修正物料上传时间

改用biomek_test
增加ResultInfoEncoder
支持返回结果上传
This commit is contained in:
Xuwznln
2025-06-08 14:43:07 +08:00
parent c0b7f2decd
commit ab0c4b708b
9 changed files with 403 additions and 267 deletions

View File

@@ -5,7 +5,7 @@ from asyncio import get_event_loop
from unilabos.utils.log import error
def run_async_func(func, *, loop=None, **kwargs):
def run_async_func(func, *, loop=None, trace_error=True, **kwargs):
if loop is None:
loop = get_event_loop()
@@ -17,5 +17,6 @@ def run_async_func(func, *, loop=None, **kwargs):
error(traceback.format_exc())
future = asyncio.run_coroutine_threadsafe(func(**kwargs), loop)
future.add_done_callback(_handle_future_exception)
return future
if trace_error:
future.add_done_callback(_handle_future_exception)
return future