This commit is contained in:
ladislav.dusa
2026-01-08 08:52:35 +01:00
parent 4bbe283211
commit 11cd76215a

View File

@@ -361,7 +361,7 @@ class PortainerApi:
print(f"failed to get containers from {path}: {e}") print(f"failed to get containers from {path}: {e}")
continue continue
contr = [] contr = []
print(f"Containers: {containers}") # print(f"Containers: {containers}")
try: try:
for c in containers: for c in containers:
print(c) print(c)
@@ -492,7 +492,7 @@ class PortainerApi:
stacks_tuples.append((s['Webhook'],s['Name'])) stacks_tuples.append((s['Webhook'],s['Name']))
# print(s['Name'], " : ", s['Webhook']) # print(s['Name'], " : ", s['Webhook'])
stacks_dict = dict(stacks_tuples) stacks_dict = dict(stacks_tuples)
print(stacks_dict) # print(stacks_dict)
#input(stacks_tuples) #input(stacks_tuples)
# stacks_tuples = [(s['AutoUpdate']['Webhook'], s['Name']) for s in stacks if "Webhook" in s['AutoUpdate'] ] # stacks_tuples = [(s['AutoUpdate']['Webhook'], s['Name']) for s in stacks if "Webhook" in s['AutoUpdate'] ]
@@ -527,7 +527,7 @@ class PortainerApi:
if s in stack_ids: if s in stack_ids:
stcs.append([s, stack_dict[s]]) stcs.append([s, stack_dict[s]])
print(stcs) # print(stcs)
with ThreadPoolExecutor(max_workers=10) as exe: with ThreadPoolExecutor(max_workers=10) as exe:
list(exe.map(update, stcs)) list(exe.map(update, stcs))