Skip to content

Commit b2d3e58

Browse files
committed
fix(scheduler): cast PodState to string to get state name
Not all _pod_state() returns are an Object right now, this is a quick fix for that problem
1 parent f817670 commit b2d3e58

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

rootfs/api/models/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ def list_pods(self, *args, **kwargs):
620620
if p['metadata']['labels']['type'] == 'run':
621621
continue
622622

623-
state = self._scheduler._pod_state(p).name
623+
state = str(self._scheduler._pod_state(p))
624624

625625
# follows kubelete convention - these are hidden unless show-all is set
626626
if state in ['down', 'crashed']:

rootfs/scheduler/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ def run(self, namespace, name, image, entrypoint, command, **kwargs):
603603
while (state == 'up' and waited < timeout):
604604
response = self._get_pod(namespace, name)
605605
pod = response.json()
606-
state = self._pod_state(pod).name
606+
state = str(self._pod_state(pod))
607607
# default data
608608
exit_code = 0
609609

0 commit comments

Comments
 (0)