fix datetime diff with timezone issue for workflow metrics log (#1714)
This commit is contained in:
@@ -515,7 +515,7 @@ class WorkflowService:
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Track workflow run duration when completed
|
# Track workflow run duration when completed
|
||||||
duration_seconds = (datetime.now(UTC) - workflow_run.created_at).total_seconds()
|
duration_seconds = (datetime.now(UTC) - workflow_run.created_at.replace(tzinfo=UTC)).total_seconds()
|
||||||
LOG.info(
|
LOG.info(
|
||||||
"Workflow run duration metrics",
|
"Workflow run duration metrics",
|
||||||
workflow_run_id=workflow_run_id,
|
workflow_run_id=workflow_run_id,
|
||||||
|
|||||||
Reference in New Issue
Block a user