From 3ed362c068ebde6211c87d4e8723a3ce716abf2f Mon Sep 17 00:00:00 2001 From: CaptainB Date: Tue, 7 Mar 2023 17:29:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=8D=87=E7=BA=A7=E5=90=8ESCHED=5FNAME?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E8=A7=A3=E6=9E=90=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1024051 --user=刘瑞斌 [安装升级]从v2.2.1版本升级到微服务改造之后的版本(v2.7.1)-历史版本的测试计划定时任务不执行 https://www.tapd.cn/55049933/s/1346309 --- .../db/migration/V131__2.3.0__release.sql | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/system-setting/backend/src/main/resources/db/migration/V131__2.3.0__release.sql b/system-setting/backend/src/main/resources/db/migration/V131__2.3.0__release.sql index 38475859c5..5b0bc9fac5 100644 --- a/system-setting/backend/src/main/resources/db/migration/V131__2.3.0__release.sql +++ b/system-setting/backend/src/main/resources/db/migration/V131__2.3.0__release.sql @@ -1,4 +1,86 @@ SET SESSION innodb_lock_wait_timeout = 7200; + +-- 定时任务不执行的问题修复 +SET foreign_key_checks = 0; +-- swagger +UPDATE qrtz_triggers +SET SCHED_NAME = 'apiScheduler' +WHERE TRIGGER_GROUP = 'SWAGGER_IMPORT' AND SCHED_NAME = 'clusterScheduler'; + +-- api +UPDATE qrtz_triggers +SET SCHED_NAME = 'apiScheduler' +WHERE TRIGGER_GROUP = 'API_SCENARIO_TEST' AND SCHED_NAME = 'clusterScheduler'; + +-- ui +UPDATE qrtz_triggers +SET SCHED_NAME = 'uiScheduler' +WHERE TRIGGER_GROUP = 'UI_SCENARIO_TEST' AND SCHED_NAME = 'clusterScheduler'; + +-- test-plan +UPDATE qrtz_triggers +SET SCHED_NAME = 'trackScheduler' +WHERE TRIGGER_GROUP = 'TEST_PLAN_TEST' AND SCHED_NAME = 'clusterScheduler'; + +-- issue-sync +UPDATE qrtz_triggers +SET SCHED_NAME = 'trackScheduler' +WHERE TRIGGER_GROUP = 'ISSUE_SYNC' AND SCHED_NAME = 'clusterScheduler'; + + +-- swagger +UPDATE qrtz_cron_triggers +SET SCHED_NAME = 'apiScheduler' +WHERE TRIGGER_GROUP = 'SWAGGER_IMPORT' AND SCHED_NAME = 'clusterScheduler'; + +-- api +UPDATE qrtz_cron_triggers +SET SCHED_NAME = 'apiScheduler' +WHERE TRIGGER_GROUP = 'API_SCENARIO_TEST' AND SCHED_NAME = 'clusterScheduler'; + +-- ui +UPDATE qrtz_cron_triggers +SET SCHED_NAME = 'uiScheduler' +WHERE TRIGGER_GROUP = 'UI_SCENARIO_TEST' AND SCHED_NAME = 'clusterScheduler'; + +-- test-plan +UPDATE qrtz_cron_triggers +SET SCHED_NAME = 'trackScheduler' +WHERE TRIGGER_GROUP = 'TEST_PLAN_TEST' AND SCHED_NAME = 'clusterScheduler'; + +-- issue-sync +UPDATE qrtz_cron_triggers +SET SCHED_NAME = 'trackScheduler' +WHERE TRIGGER_GROUP = 'ISSUE_SYNC' AND SCHED_NAME = 'clusterScheduler'; + + +-- swagger +UPDATE qrtz_job_details +SET SCHED_NAME = 'apiScheduler', JOB_CLASS_NAME = 'io.metersphere.sechedule.SwaggerUrlImportJob' +WHERE JOB_GROUP = 'SWAGGER_IMPORT' AND SCHED_NAME = 'clusterScheduler'; + +-- api +UPDATE qrtz_job_details +SET SCHED_NAME = 'apiScheduler', JOB_CLASS_NAME = 'io.metersphere.sechedule.ApiScenarioTestJob' +WHERE JOB_GROUP = 'API_SCENARIO_TEST' AND SCHED_NAME = 'clusterScheduler'; + +-- ui +UPDATE qrtz_job_details +SET SCHED_NAME = 'uiScheduler', JOB_CLASS_NAME = 'io.metersphere.sechedule.UiTestJob' +WHERE JOB_GROUP = 'UI_SCENARIO_TEST' AND SCHED_NAME = 'clusterScheduler'; + +-- test-plan +UPDATE qrtz_job_details +SET SCHED_NAME = 'trackScheduler', JOB_CLASS_NAME = 'io.metersphere.plan.job.TestPlanTestJob' +WHERE JOB_GROUP = 'TEST_PLAN_TEST' AND SCHED_NAME = 'clusterScheduler'; + +-- issue-sync +UPDATE qrtz_job_details +SET SCHED_NAME = 'trackScheduler', JOB_CLASS_NAME = 'io.metersphere.job.sechedule.IssueSyncJob' +WHERE JOB_GROUP = 'ISSUE_SYNC' AND SCHED_NAME = 'clusterScheduler'; + +SET foreign_key_checks = 1; + -- v2_3 init -- V2_3_micro_service_module -- 工单名称: V2_3_micro_service_module