feat(schedule): 优化排程任务配置与进度契约处理逻辑

This commit is contained in:
hugo committed 2026-07-08 16:09:28 +08:00
1 parent d54f51ddc3
commit 99453aa52a
65 files changed
+2837 -487

No files matched your search

+8 -6
View File
@@ -49,11 +49,12 @@ def _mk_check_task(owner_id: int, *, enabled=True):
task = ScheduleTask(
schedule_no='CHK-ROHS-001',
name='RoHS 自动检核',
schedule_type='platform_app',
schedule_type='data_pipeline',
data_source_type='database',
owner_user_id=owner_id,
cron_expr='0 * * * *',
wait_seconds=5,
platform_api_path='/1',
platform_api_path=None,
enabled=enabled,
)
db.session.add(task)
@@ -65,11 +66,12 @@ def _mk_other_check_task(owner_id: int):
task = ScheduleTask(
schedule_no='CHK-GENERAL-001',
name='通用检核',
schedule_type='platform_app',
schedule_type='data_pipeline',
data_source_type='database',
owner_user_id=owner_id,
cron_expr='0 * * * *',
wait_seconds=5,
platform_api_path='/general-check',
platform_api_path=None,
enabled=True,
)
db.session.add(task)
@@ -512,7 +514,7 @@ def test_file_check_tool_running_conflict_is_per_task(app, client, monkeypatch):
second_task = ScheduleTask(
schedule_no='CHK-ROHS-002',
name='RoHS 文件检核备用',
schedule_type='platform_app',
schedule_type='data_pipeline',
owner_user_id=admin.id,
cron_expr='0 * * * *',
wait_seconds=5,
@@ -609,7 +611,7 @@ def test_workspace_file_check_active_run_filters_by_task_id(app, client):
task_b = ScheduleTask(
schedule_no='CHK-ROHS-002',
name='RoHS 文件检核 B',
schedule_type='platform_app',
schedule_type='data_pipeline',
owner_user_id=admin.id,
cron_expr='0 * * * *',
wait_seconds=5,