mirror of
https://github.com/agentuniverse-ai/agentUniverse.git
synced 2026-02-09 01:59:19 +08:00
@@ -174,7 +174,7 @@ def service_run_async(service_id: str, params: dict, saved: bool = True):
|
||||
Returns a dict containing two keys: success and result.
|
||||
success: This key holds a boolean value indicating the task was
|
||||
successfully or not.
|
||||
request_id: Stand for a single request taski, can be used in
|
||||
request_id: Stand for a single request task id, can be used in
|
||||
service_run_result api to get the result of async task.
|
||||
"""
|
||||
params = {} if params is None else params
|
||||
|
||||
@@ -14,7 +14,7 @@ POST_FORK_QUEUE: List[FunctionWithArgs] = []
|
||||
|
||||
def add_post_fork(func: Callable, *args: Any, **kwargs: Any) -> None:
|
||||
"""
|
||||
Add funcs and parameters into a waiting list, all of them will be executed
|
||||
Add func and parameters into a waiting list, all of them will be executed
|
||||
after gunicorn worker child processes have been forked, or before flask
|
||||
main app start if you work without gunicorn.
|
||||
"""
|
||||
|
||||
@@ -121,7 +121,7 @@ class RequestTask:
|
||||
if self.saved:
|
||||
self.update_request_do(force=True)
|
||||
except Exception as e:
|
||||
LOGGER.error("request task execute Fail: " + str(e) + traceback.format_exc())
|
||||
LOGGER.error("Request task execute failed: " + str(e) + traceback.format_exc())
|
||||
if self.saved:
|
||||
self.__request_do__.result['result'] = {"error_msg": str(e)}
|
||||
self.next_state(TaskStateEnum.FAIL)
|
||||
@@ -162,7 +162,7 @@ class RequestTask:
|
||||
if self.saved:
|
||||
self.update_request_do(force=True)
|
||||
except Exception as e:
|
||||
LOGGER.error("request task execute Fail: " + str(e) + traceback.format_exc())
|
||||
LOGGER.error("Request task execute failed: " + str(e) + traceback.format_exc())
|
||||
if self.saved:
|
||||
self.__request_do__.result['result'] = {"error_msg": str(e)}
|
||||
self.next_state(TaskStateEnum.FAIL)
|
||||
|
||||
@@ -64,7 +64,7 @@ class AgentUniverseService(agentuniverse_service_pb2_grpc.AgentUniverseService):
|
||||
Returns agentuniverse_service_pb2.AgentServiceResponse:
|
||||
success: This key holds a boolean value indicating the task was
|
||||
successfully or not.
|
||||
request_id: Stand for a single request taski, can be used in
|
||||
request_id: Stand for a single request task id, can be used in
|
||||
service_run_result api to get the result of async task.
|
||||
"""
|
||||
service_result = service_run_async(
|
||||
|
||||
@@ -56,7 +56,7 @@ def service_run_async(saved: bool, params: str, service_id: str):
|
||||
Returns a dict containing two keys: success and request_id.
|
||||
success: This key holds a boolean value indicating the task was
|
||||
successfully or not.
|
||||
request_id: Stand for a single request taski, can be used in
|
||||
request_id: Stand for a single request task id, can be used in
|
||||
service_run_result api to get the result of async task.
|
||||
"""
|
||||
if params and params.strip():
|
||||
|
||||
Reference in New Issue
Block a user