Increased timeouts
All checks were successful
/ pylint (push) Successful in 11s
/ mypy (push) Successful in 13s

This commit is contained in:
Firq 2024-07-20 17:25:34 +02:00
parent 360aca36c5
commit 34cb6e5dc7
Signed by: Firq
GPG key ID: 3ACC61C8CEC83C20
2 changed files with 10 additions and 9 deletions

View file

@ -99,10 +99,11 @@ class DockgeConnection:
"password": storage.get("password", encoded=True),
"token": ""
},
timeout=5
timeout=10
)
retry = False
except socketio.exceptions.TimeoutError:
print("Reached timeout for login, retrying ...")
retry = True
count += 1
@ -125,42 +126,42 @@ class DockgeConnection:
"""
Lists status for a stack
"""
ret = self._sio.call("agent", ("", "serviceStatusList", name), timeout=5)
ret = self._sio.call("agent", ("", "serviceStatusList", name), timeout=10)
return ret
def restart(self, name):
"""
Restarts a given stack
"""
ret = self._sio.call("agent", ("", "restartStack", name), timeout=10)
ret = self._sio.call("agent", ("", "restartStack", name), timeout=30)
return ret
def update(self, name):
"""
Updates a given stack
"""
ret = self._sio.call("agent", ("", "updateStack", name), timeout=10)
ret = self._sio.call("agent", ("", "updateStack", name), timeout=30)
return ret
def stop(self, name):
"""
Stops a given stack
"""
ret = self._sio.call("agent", ("", "stopStack", name), timeout=10)
ret = self._sio.call("agent", ("", "stopStack", name), timeout=30)
return ret
def start(self, name):
"""
Starts a given stack
"""
ret = self._sio.call("agent", ("", "startStack", name), timeout=10)
ret = self._sio.call("agent", ("", "startStack", name), timeout=30)
return ret
def down(self, name):
"""
Stops and downs a given stack
"""
ret = self._sio.call("agent", ("", "downStack", name), timeout=10)
ret = self._sio.call("agent", ("", "downStack", name), timeout=30)
return ret
def disconnect(self):

View file

@ -1,6 +1,6 @@
[project]
name = "dockge_cli"
version = "0.1.0"
version = "0.1.1-c.1"
dependencies = [
"pyyaml~=6.0.1",
"pydantic~=2.8.0",
@ -11,7 +11,7 @@ dependencies = [
requires-python = ">= 3.10"
authors = [{name = "Firq", email = "firelp42@gmail.com"}]
maintainers = [{name = "Firq", email = "firelp42@gmail.com"}]
description = "CLi for interacting with dockge"
description = "CLI for interacting with dockge"
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3",