From a8997ae160c87fca3cf069c7a59083d1369dfd37 Mon Sep 17 00:00:00 2001 From: yystopf Date: Thu, 7 Mar 2024 15:49:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=EF=BC=9A=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E5=8F=96=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/api/v1/projects/actions/runs/index.json.jbuilder | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/api/v1/projects/actions/runs/index.json.jbuilder b/app/views/api/v1/projects/actions/runs/index.json.jbuilder index e108f269d..69d1b21d5 100644 --- a/app/views/api/v1/projects/actions/runs/index.json.jbuilder +++ b/app/views/api/v1/projects/actions/runs/index.json.jbuilder @@ -15,8 +15,8 @@ if @result_object[:data]["Runs"].present? end json.status run["Status"] - json.time_ago time_from_now(run["Updated"]) - json.holding_time run["Updated"]-run["Started"] + json.time_ago time_from_now(run["Started"]) + json.holding_time run["Status"] == 6 ? Time.now.to_i - run["Started"] : run["Stopped"] - run["Started"] end else json.runs []