mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-18 22:54:17 +09:00
fix: update run status
This commit is contained in:
@ -84,7 +84,11 @@ func (run *Run) LoadAttributes(ctx context.Context) error {
|
||||
}
|
||||
|
||||
func (run *Run) TakeTime() time.Duration {
|
||||
return run.Started.AsTime().Sub(run.Stopped.AsTime())
|
||||
started := run.Started.AsTime()
|
||||
if run.Status.IsDone() {
|
||||
return run.Stopped.AsTime().Sub(started)
|
||||
}
|
||||
return time.Since(started)
|
||||
}
|
||||
|
||||
func updateRepoRunsNumbers(ctx context.Context, repo *repo_model.Repository) error {
|
||||
|
Reference in New Issue
Block a user