From a46b4338b49f46b758155938fcc103df453aa324 Mon Sep 17 00:00:00 2001 From: Tachibana waita Date: Thu, 15 Feb 2024 17:13:19 +0900 Subject: [PATCH] status is online and busy is true equal Active runner (#191) --- pkg/runner/runner_delete.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/runner/runner_delete.go b/pkg/runner/runner_delete.go index 4e85cd7..195c130 100644 --- a/pkg/runner/runner_delete.go +++ b/pkg/runner/runner_delete.go @@ -192,6 +192,11 @@ var ( ) func sanitizeGitHubRunner(ghRunner github.Runner, dsRunner datastore.Runner) error { + if ghRunner.GetBusy() { + // runner is busy, so not will delete + return ErrNotWillDeleteRunner + } + switch ghRunner.GetStatus() { case StatusWillDelete: if err := sanitizeRunner(dsRunner, MustRunningTime); err != nil {