From 377d11d13b611390c4de99076dcea266647a2ca4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=81=8E=E4=B8=96=E7=A7=8B=E9=A2=A8?= <1040926235@qq.com> Date: Thu, 27 Mar 2025 17:23:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20WorkflowRunDetailApi=20created=5Fat?= =?UTF-8?q?=E3=80=81finished=5Fat=20types=20changed=20to=20timestamps=20(#?= =?UTF-8?q?16821)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/controllers/service_api/app/workflow.py | 5 +++-- web/app/components/develop/template/template_workflow.en.mdx | 4 ++-- web/app/components/develop/template/template_workflow.ja.mdx | 4 ++-- web/app/components/develop/template/template_workflow.zh.mdx | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/api/controllers/service_api/app/workflow.py b/api/controllers/service_api/app/workflow.py index 0cf852cfba..1cd7e5bf23 100644 --- a/api/controllers/service_api/app/workflow.py +++ b/api/controllers/service_api/app/workflow.py @@ -27,6 +27,7 @@ from core.model_runtime.errors.invoke import InvokeError from extensions.ext_database import db from fields.workflow_app_log_fields import workflow_app_log_pagination_fields from libs import helper +from libs.helper import TimestampField from models.model import App, AppMode, EndUser from models.workflow import WorkflowRun, WorkflowRunStatus from services.app_generate_service import AppGenerateService @@ -44,8 +45,8 @@ workflow_run_fields = { "error": fields.String, "total_steps": fields.Integer, "total_tokens": fields.Integer, - "created_at": fields.DateTime, - "finished_at": fields.DateTime, + "created_at": TimestampField, + "finished_at": TimestampField, "elapsed_time": fields.Float, } diff --git a/web/app/components/develop/template/template_workflow.en.mdx b/web/app/components/develop/template/template_workflow.en.mdx index c8b4b614c8..0f15c4406b 100644 --- a/web/app/components/develop/template/template_workflow.en.mdx +++ b/web/app/components/develop/template/template_workflow.en.mdx @@ -370,8 +370,8 @@ Workflow applications offers non-session support and is ideal for translation, a "error": null, "total_steps": 3, "total_tokens": 0, - "created_at": "Thu, 18 Jul 2024 03:17:40 -0000", - "finished_at": "Thu, 18 Jul 2024 03:18:10 -0000", + "created_at": 1705407629, + "finished_at": 1727807631, "elapsed_time": 30.098514399956912 } ``` diff --git a/web/app/components/develop/template/template_workflow.ja.mdx b/web/app/components/develop/template/template_workflow.ja.mdx index 3bd56807ae..0239b40224 100644 --- a/web/app/components/develop/template/template_workflow.ja.mdx +++ b/web/app/components/develop/template/template_workflow.ja.mdx @@ -373,8 +373,8 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from "error": null, "total_steps": 3, "total_tokens": 0, - "created_at": "Thu, 18 Jul 2024 03:17:40 -0000", - "finished_at": "Thu, 18 Jul 2024 03:18:10 -0000", + "created_at": 1705407629, + "finished_at": 1727807631, "elapsed_time": 30.098514399956912 } ``` diff --git a/web/app/components/develop/template/template_workflow.zh.mdx b/web/app/components/develop/template/template_workflow.zh.mdx index c687fa1a51..c74818dc92 100644 --- a/web/app/components/develop/template/template_workflow.zh.mdx +++ b/web/app/components/develop/template/template_workflow.zh.mdx @@ -363,8 +363,8 @@ Workflow 应用无会话支持,适合用于翻译/文章写作/总结 AI 等 "error": null, "total_steps": 3, "total_tokens": 0, - "created_at": "Thu, 18 Jul 2024 03:17:40 -0000", - "finished_at": "Thu, 18 Jul 2024 03:18:10 -0000", + "created_at": 1705407629, + "finished_at": 1727807631, "elapsed_time": 30.098514399956912 } ```