mirror of https://code.forgejo.org/forgejo/runner
Fix reporting log in `Reporter.Close` (#126)
Previously, the `Close` func returns incorrectly so that the logs may not be reported. This PR fixes the incorrect return and sets the `StoppedAt` to get the correct task duration. Reviewed-on: https://gitea.com/gitea/act_runner/pulls/126 Reviewed-by: Jason Song <i@wolfogre.com> Co-authored-by: Zettat123 <zettat123@gmail.com> Co-committed-by: Zettat123 <zettat123@gmail.com>pull/25/head
parent
c69c353d93
commit
bc6031eff7
|
@ -184,7 +184,7 @@ func (r *Reporter) Close(lastWords string) error {
|
|||
Time: timestamppb.Now(),
|
||||
Content: lastWords,
|
||||
})
|
||||
return nil
|
||||
r.state.StoppedAt = timestamppb.Now()
|
||||
} else if lastWords != "" {
|
||||
r.logRows = append(r.logRows, &runnerv1.LogRow{
|
||||
Time: timestamppb.Now(),
|
||||
|
|
Loading…
Reference in New Issue