Skip to content

Commit 097c14d

Browse files
committed
Add headers to runner state return and update logging for busy state
1 parent 6e1c72c commit 097c14d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lambdas/functions/control-plane/src/scale-runners/scale-down.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ async function getGitHubSelfHostedRunnerState(
7575
repo: ec2runner.owner.split('/')[1],
7676
});
7777

78-
return { id: state.data.id, name: state.data.name, busy: state.data.busy, status: state.data.status };
78+
return { id: state.data.id, name: state.data.name, busy: state.data.busy, status: state.data.status, headers: state.headers };
7979
}
8080

8181
async function getGitHubRunnerBusyState(client: Octokit, ec2runner: RunnerInfo, runnerId: number): Promise<boolean> {
8282
const state = await getGitHubSelfHostedRunnerState(client, ec2runner, runnerId);
83-
logger.info(`Runner '${ec2runner.instanceId}' - GitHub Runner ID '${runnerId}' - Busy: ${state.data.busy}`);
83+
logger.info(`Runner '${ec2runner.instanceId}' - GitHub Runner ID '${runnerId}' - Busy: ${state.busy}`);
8484
metricGitHubAppRateLimit(state.headers);
8585
return state.busy;
8686
}

0 commit comments

Comments
 (0)