mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-19 19:23:39 +09:00
fix(actions): use gitea's clock for actions durations (#39323)
This commit is contained in:
@@ -174,7 +174,10 @@ func (run *ActionRun) LoadRepo(ctx context.Context) error {
|
||||
}
|
||||
|
||||
func (run *ActionRun) Duration() time.Duration {
|
||||
d := calculateDuration(run.Started, run.Stopped, run.Status, run.Updated) + run.PreviousDuration
|
||||
d := calculateDuration(run.Started, run.Stopped, run.Status, run.Updated)
|
||||
if run.LatestAttemptID == 0 {
|
||||
d += run.PreviousDuration
|
||||
}
|
||||
if d < 0 {
|
||||
return 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user