From aaea993956a70cd6233a807e19426ddeec44dcc3 Mon Sep 17 00:00:00 2001 From: azhengzz <820108271@qq.com> Date: Wed, 10 Mar 2021 18:14:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AD=97=E5=85=B8=E2=80=98DI?= =?UTF-8?q?SPATCHER=5FTRIGGER=5FTYPE=E2=80=99=E8=A1=A8=E7=A4=BA=E2=80=98?= =?UTF-8?q?=E8=B0=83=E5=BA=A6=E8=A7=A6=E5=8F=91=E7=B1=BB=E5=9E=8B=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ApiAutomationTest/app/cores/dispatcher.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: