Add attribute to runner API to show whether builds are currently executing there
Description
Sometimes it would be handy to know whether a given runner is actively executing a job or if it's idle.
Proposal
Add an attribute to the runner API that details how many jobs are currently executing.
Links / references
Zendesk: https://gitlab.zendesk.com/agent/tickets/80806
Documentation blurb
Overview/Use-Case
The customer requesting this feature recycles/refreshes runners on a schedule. Before taking a runner offline they need to know whether there are jobs running or not. If they kill a runner while a job is in progress they can cause unnecessary failures. If they can check the state via the API they can pause the runner and then be sure no jobs are being executed.
Feature checklist
Make sure these are completed before closing the issue, with a link to the relevant commit.
-
Feature assurance -
Documentation -
Added to features.yml