We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0fa78f0 + 7d24923 commit 78a688dCopy full SHA for 78a688d
1 file changed
rootfs/api/models/app.py
@@ -269,6 +269,11 @@ def restart(self, **kwargs): # noqa
269
del kwargs['name']
270
pods = self.list_pods(**kwargs)
271
# Add in the latest name
272
+ if len(pods) == 0:
273
+ # if pod is not even scheduled wait for it and pass dummy kwargs
274
+ # to indicate restart of a single pod
275
+ kwargs['name'] = "dummy"
276
+ continue
277
kwargs['name'] = pods[0]['name']
278
pods = pods[0]
279
0 commit comments