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

View file

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