mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2025-12-18 05:21:19 +00:00
修正物料上传时间
改用biomek_test 增加ResultInfoEncoder 支持返回结果上传
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user