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.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix: Make the latency and logs of web applications consistent. (#21578)
jiangbo72171d6cf1b1d30
diff --git a/api/core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py b/api/core/app/task_pipeline/easy_ui_based_generate_task_pipeline.pyindex d535e1f835c..3c8c7bb5a2a 100644--- a/api/core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py+++ b/api/core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py@@ -395,6 +395,7 @@ class EasyUIBasedGenerateTaskPipeline(BasedGenerateTaskPipeline):message.provider_response_latency = time.perf_counter() - self._start_atmessage.total_price = usage.total_pricemessage.currency = usage.currency+ self._task_state.llm_result.usage.latency = message.provider_response_latencymessage.message_metadata = self._task_state.metadata.model_dump_json()if trace_manager:diff --git a/api/core/workflow/workflow_cycle_manager.py b/api/core/workflow/workflow_cycle_manager.pyindex 6ee562fc8db..0aab2426af7 100644--- a/api/core/workflow/workflow_cycle_manager.py+++ b/api/core/workflow/workflow_cycle_manager.py@@ -27,6 +27,7 @@ from core.workflow.enums import SystemVariableKeyfrom core.workflow.repositories.workflow_execution_repository import WorkflowExecutionRepositoryfrom core.workflow.repositories.workflow_node_execution_repository import WorkflowNodeExecutionRepositoryfrom core.workflow.workflow_entry import WorkflowEntry+from libs.datetime_utils import naive_utc_now@dataclass@@ -160,12 +161,13 @@ class WorkflowCycleManager:exceptions_count: int = 0,) -> WorkflowExecution:workflow_execution = self._get_workflow_execution_or_raise_error(workflow_run_id)+ now = naive_utc_now()workflow_execution.status = WorkflowExecutionStatus(status.value)workflow_execution.error_message = error_messageworkflow_execution.total_tokens = total_tokensworkflow_execution.total_steps = total_steps- workflow_execution.finished_at = datetime.now(UTC).replace(tzinfo=None)+ workflow_execution.finished_at = nowworkflow_execution.exceptions_count = exceptions_count# Use the instance repository to find running executions for a workflow run@@ -174,7 +176,6 @@ class WorkflowCycleManager:)# Update the domain models- now = datetime.now(UTC).replace(tzinfo=None)for node_execution in running_node_executions:if node_execution.node_execution_id:# Update the domain model