This commit is contained in:
2026-01-12 23:30:30 +01:00
parent ae387a794c
commit 2dc800f7f9
2 changed files with 8 additions and 5 deletions

View File

@@ -682,8 +682,4 @@ if __name__ == "__main__":
sys.exit()
if args.action == "refresh_status":
if args.stack == "all":
print("Stopping all stacks...")
stcks = por.get_stacks(endpoint_id=args.endpoint_id)
else:
por.refresh_status(args.stack_id)
por.refresh_status(args)

View File

@@ -141,6 +141,13 @@ class PortainerApi:
self.get_endpoints()
self.get_stacks()
def refresh_status(self, args):
for s in self.all_data['stacks']['m-s']['by_id']:
path = f'/stacks/{s}/images_status?refresh=true'
print(path)
res = self._api_get(path, timeout=args.timeout)
def _is_number(self, s):
"""Check if the input string is a number."""
try: