diff --git a/ApiAutomationTest/app/cores/dispatcher.py b/ApiAutomationTest/app/cores/dispatcher.py index 04c8909..8ddafe0 100644 --- a/ApiAutomationTest/app/cores/dispatcher.py +++ b/ApiAutomationTest/app/cores/dispatcher.py @@ -943,7 +943,7 @@ def async_module_run(module_id): with app.test_request_context(): # 在线程中创建请求上下文,当栈中没有应用上下文时同时也会创建应用上下文 # 将主线程请求上下文栈中的request和session放入子线程的请求上下文栈顶 _request_ctx_stack.top.request = request - session['dispatcher_trigger_type'] = '手动' # 调度触发类型 + session['dispatcher_trigger_type'] = DISPATCHER_TRIGGER_TYPE.BY_HAND # 调度触发类型 _request_ctx_stack.top.session = session ModuleDispatcher(module_id=module_id, dispatcher_type=DISPATCHER_TYPE.BUILD).run() except Exception as e: @@ -962,7 +962,7 @@ def apscheduler_async_module_run(module_id, app, request, session): with app.test_request_context(): # 在线程中创建请求上下文,当栈中没有应用上下文时同时也会创建应用上下文 # 将主线程请求上下文栈中的request和session放入子线程的请求上下文栈顶 _request_ctx_stack.top.request = request - session['dispatcher_trigger_type'] = '定时任务' # 调度触发类型 + session['dispatcher_trigger_type'] = DISPATCHER_TRIGGER_TYPE.BY_SCHEDULE # 调度触发类型 _request_ctx_stack.top.session = session ModuleDispatcher(module_id=module_id, dispatcher_type=DISPATCHER_TYPE.BUILD).run() except Exception as e: