Skip to content

Commit 98940b2

Browse files
authored
Merge pull request #1457 from minrk/pod-quota
fix total pod count
2 parents b10a3d7 + 8da69f2 commit 98940b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

binderhub/builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ async def launch(self, provider):
537537
_preload_content=False,
538538
)
539539
resp = await asyncio.wrap_future(f)
540-
pods = json.loads(resp.read())
540+
pods = json.loads(resp.read())["items"]
541541
total_pods = len(pods)
542542

543543
if pod_quota is not None and total_pods >= pod_quota:
@@ -550,7 +550,7 @@ async def launch(self, provider):
550550
await self.fail("Too many users on this BinderHub! Try again soon.")
551551
return
552552

553-
for pod in pods["items"]:
553+
for pod in pods:
554554
for container in pod["spec"]["containers"]:
555555
# is the container running the same image as us?
556556
# if so, count one for the current repo.

0 commit comments

Comments
 (0)