Skip to content

Commit cdea890

Browse files
author
lijianguo
committed
chore(controller): pretty pods list print
1 parent 1af2a3a commit cdea890

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

rootfs/api/views.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,8 @@ def list(self, *args, **kwargs):
352352
exist_pod_type = list(set([_["type"] for _ in data if _["type"]]))
353353
structure = self.get_app().structure
354354
procfile_structure = self.get_app().procfile_structure
355+
# remove prev release container type
356+
structure = {k: v for k, v in structure.items() if (v != 0 or k in procfile_structure)} # noqa
355357
for _ in structure.keys():
356358
if _ not in exist_pod_type:
357359
replicas = str(autoscale[_]['min']) + '-' + str(autoscale[_]['max']) \

0 commit comments

Comments
 (0)