mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-10 19:50:30 +00:00
fix: report busy status for offline workers (#1009)
ref #911 Fix #993 cannot work because the runner busy status is not reported when offline
This commit is contained in:
committed by
GitHub
parent
91102c8088
commit
7261d927fb
@@ -337,7 +337,7 @@ func (r *Client) IsRunnerBusy(ctx context.Context, enterprise, org, repo, name s
|
||||
for _, runner := range runners {
|
||||
if runner.GetName() == name {
|
||||
if runner.GetStatus() == "offline" {
|
||||
return false, &RunnerOffline{runnerName: name}
|
||||
return runner.GetBusy(), &RunnerOffline{runnerName: name}
|
||||
}
|
||||
return runner.GetBusy(), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user