Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: WorkflowRunDetailApi created_at、finished_at types changed to timestamps (#16821)

過世秋風377d11d13b61
diff --git a/api/controllers/service_api/app/workflow.py b/api/controllers/service_api/app/workflow.py
index 0cf852cfba8..1cd7e5bf239 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 c8b4b614c8e..0f15c4406be 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 3bd56807ae3..0239b402241 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 c687fa1a518..c74818dc922 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
}
```