1.排程管理功能更新,支持数据源配置以及自定义查询条件测试

2.应用管理增加Dify应用类型,支持不同类型下的连通性测试
This commit is contained in:
hugo committed 2026-05-20 17:21:46 +08:00
1 parent 72642b981e
commit 6ada6810c5
18 files changed
+2185 -535

No files matched your search

@@ -58,9 +58,6 @@ def create_task(
enabled: bool,
actor_id: int | None,
) -> ScheduleTask:
if not normalize_platform_api_path(platform_api_path):
raise ValueError("platform_api_path is required for platform_app")
task = ScheduleTask(
schedule_no=_generate_schedule_no(),
name=name,
@@ -151,11 +148,18 @@ def run_task_now(task: ScheduleTask, *, trigger_type: str, triggered_by_user_id:
db.session.commit()
start_ts = time.time()
step_logs: list = []
try:
executor = resolve_schedule_executor(task)
total_count, success_count, failed_count, skipped_count, details, errors = executor(task, run)
total_count, success_count, failed_count, skipped_count, details, errors, step_logs = executor(task, run)
except Exception as exc:
total_count, success_count, failed_count, skipped_count, details, errors = 0, 0, 0, 0, [], [str(exc)]
step_logs = [{"step": "executor_error", "status": "failed", "detail": {"error": str(exc)}}]
try:
db.session.refresh(run)
except Exception:
pass
if is_run_cancelled(run.id):
run.finished_at = datetime.utcnow()
@@ -211,6 +215,7 @@ def run_task_now(task: ScheduleTask, *, trigger_type: str, triggered_by_user_id:
run.success_count = success_count
run.failed_count = failed_count
run.skipped_count = skipped_count
run.step_logs = step_logs if step_logs else None
run.response_summary_json = {
"errors": errors[:20],
"schedule_type": task.schedule_type,