const status = await api.compute.status();
if (!status.available) {
console.log("Compute is unavailable:", status.reason);
} else {
console.log(status.workspace, status.network);
}status = api.compute.status()
if not status.get("available"):
print("Compute is unavailable:", status.get("reason"))
else:
print(status["workspace"], status["network"])Returned fields
availablebooleanWhether the runner currently accepts compute requests.
reasonstring|nullA public reason when the runner is unavailable; otherwise null.
workspacestringWorkspace mount path. Currently /workspace.
networkstringNetwork policy reported by the runner. The current service reports none.
An available result is a point-in-time check, not a reservation. The runner can become unavailable before a later command starts; handle that request's error as well.