mirror of
https://gitea.com/gitea/act_runner.git
synced 2026-03-22 06:45:03 +01:00
retry log upload and result independently
This commit is contained in:
@@ -5,6 +5,7 @@ package report
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
@@ -263,12 +264,15 @@ func (r *Reporter) Close(lastWords string) error {
|
|||||||
log.Error("No Response from RunDaemon for 60s, continue best effort")
|
log.Error("No Response from RunDaemon for 60s, continue best effort")
|
||||||
}
|
}
|
||||||
|
|
||||||
return retry.Do(func() error {
|
// Report the job outcome even when all log‑retry attempts have been exhausted
|
||||||
if err := r.ReportLog(true); err != nil {
|
return errors.Join(
|
||||||
return err
|
retry.Do(func() error {
|
||||||
}
|
return r.ReportLog(true)
|
||||||
return r.ReportState(true)
|
}, retry.Context(r.ctx)),
|
||||||
}, retry.Context(r.ctx))
|
retry.Do(func() error {
|
||||||
|
return r.ReportState(true)
|
||||||
|
}, retry.Context(r.ctx)),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *Reporter) ReportLog(noMore bool) error {
|
func (r *Reporter) ReportLog(noMore bool) error {
|
||||||
|
|||||||
Reference in New Issue
Block a user