mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-26 18:20:59 +00:00
support ErrContainerNotFound in health check timeout retrieval too
This commit is contained in:
parent
7b75a647d4
commit
a274893fe5
2 changed files with 7 additions and 2 deletions
|
@ -221,7 +221,9 @@ func (cr *containerReference) GetHealth(ctx context.Context) (Health, error) {
|
|||
|
||||
func (cr *containerReference) GetHealthCheckTimeout(ctx context.Context) (*time.Duration, error) {
|
||||
resp, err := cr.cli.ContainerInspect(ctx, cr.id)
|
||||
if err != nil {
|
||||
if cerrdefs.IsNotFound(err) {
|
||||
return nil, ErrContainerNotFound
|
||||
} else if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if resp.Config == nil || resp.Config.Healthcheck == nil || len(resp.Config.Healthcheck.Test) == 1 && strings.EqualFold(resp.Config.Healthcheck.Test[0], "NONE") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue