mirror of
https://gitlab.sectorq.eu/jaydee/portainer.git
synced 2026-01-28 20:39:45 +01:00
Compare commits
2 Commits
04f5a059a4
...
d7f202e2b8
| Author | SHA1 | Date | |
|---|---|---|---|
| d7f202e2b8 | |||
| fe2f9ddd4b |
6
port.py
6
port.py
@@ -1053,12 +1053,12 @@ class Portainer:
|
||||
|
||||
def recreate_container(self,service_id, pull=False):
|
||||
"""Restart a service on an endpoint."""
|
||||
path = f"/endpoints/{self.endpoint_id}/containers/{service_id}/recreate"
|
||||
print(path)
|
||||
path = f"/docker/{self.endpoint_id}/containers/{service_id}/recreate"
|
||||
#print(path)
|
||||
params={"pullImage": pull}
|
||||
try:
|
||||
resp = self._api_post(path, json=params, timeout=20)
|
||||
print(resp)
|
||||
#print(resp)
|
||||
except ValueError as e:
|
||||
print(f"Error restarting service: {e}")
|
||||
return []
|
||||
|
||||
Reference in New Issue
Block a user