mirror of
https://gitlab.sectorq.eu/jaydee/portainer.git
synced 2026-01-29 04:49:44 +01:00
Compare commits
4 Commits
bb8ef3bdb8
...
3152014ca3
| Author | SHA1 | Date | |
|---|---|---|---|
| 3152014ca3 | |||
| e411c81224 | |||
| 8ae696a96a | |||
| abd989a0db |
@@ -343,7 +343,6 @@ class PortainerApi:
|
|||||||
# print(stack)
|
# print(stack)
|
||||||
cont = []
|
cont = []
|
||||||
data = {}
|
data = {}
|
||||||
|
|
||||||
eps = [ep for ep in self.all_data['endpoints']['by_id'].keys()]
|
eps = [ep for ep in self.all_data['endpoints']['by_id'].keys()]
|
||||||
#input(eps)
|
#input(eps)
|
||||||
for endpoint in eps:
|
for endpoint in eps:
|
||||||
@@ -362,9 +361,10 @@ 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}")
|
||||||
try:
|
try:
|
||||||
for c in containers:
|
for c in containers:
|
||||||
#input(c)
|
print(c)
|
||||||
cont.append([c["Names"][0].replace("/", ""),c["Id"], c['Image']])
|
cont.append([c["Names"][0].replace("/", ""),c["Id"], c['Image']])
|
||||||
contr.append([c["Names"][0].replace("/", ""), c["Id"], c['Image']])
|
contr.append([c["Names"][0].replace("/", ""), c["Id"], c['Image']])
|
||||||
if self.all_data["endpoints"]["by_id"][endpoint] in data:
|
if self.all_data["endpoints"]["by_id"][endpoint] in data:
|
||||||
@@ -514,7 +514,7 @@ class PortainerApi:
|
|||||||
values=stacks_tuples
|
values=stacks_tuples
|
||||||
).run()
|
).run()
|
||||||
stcs = []
|
stcs = []
|
||||||
input(stack_ids)
|
#input(stack_ids)
|
||||||
|
|
||||||
if args.stack == "all":
|
if args.stack == "all":
|
||||||
for s in stack_dict:
|
for s in stack_dict:
|
||||||
@@ -528,7 +528,7 @@ class PortainerApi:
|
|||||||
with ThreadPoolExecutor(max_workers=10) as exe:
|
with ThreadPoolExecutor(max_workers=10) as exe:
|
||||||
list(exe.map(update, stcs))
|
list(exe.map(update, stcs))
|
||||||
|
|
||||||
input('UPDATED')
|
#input('UPDATED')
|
||||||
if not args.autostart:
|
if not args.autostart:
|
||||||
time.sleep(120)
|
time.sleep(120)
|
||||||
cont = []
|
cont = []
|
||||||
@@ -1030,6 +1030,7 @@ class PortainerApi:
|
|||||||
print(err)
|
print(err)
|
||||||
else:
|
else:
|
||||||
print(ok)
|
print(ok)
|
||||||
|
self.gotify_message(f"Service update process finished")
|
||||||
print("\033[?25h", end="")
|
print("\033[?25h", end="")
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user