From 7ed84e6b018d1e683c28a1b8740d7d96b7afe004 Mon Sep 17 00:00:00 2001 From: gamoutatsumi Date: Tue, 19 Nov 2024 17:03:09 +0900 Subject: [PATCH] fix disabled resource_type handler --- pool-agent/cmd/agent.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pool-agent/cmd/agent.go b/pool-agent/cmd/agent.go index d0edb48..c73badb 100644 --- a/pool-agent/cmd/agent.go +++ b/pool-agent/cmd/agent.go @@ -213,6 +213,9 @@ func (a *Agent) adjustInstancePool() error { } for _, i := range s { + if i.Config[configKeyResourceType] == "" || i.Config[configKeyImageAlias] == "" || i.Config[configKeyRunnerName] == "" { + continue + } l := slog.With("instance", i.Name) if _, ok := a.ResourceTypesCounts[i.Config[configKeyResourceType]]; !ok { toDelete = append(toDelete, i.Config[configKeyResourceType])