From 34cb6e5dc7e1e12fdfef245184052c58b6bf07d3 Mon Sep 17 00:00:00 2001 From: Firq Date: Sat, 20 Jul 2024 17:25:34 +0200 Subject: [PATCH] Increased timeouts --- dockge_cli/service/connection.py | 15 ++++++++------- pyproject.toml | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/dockge_cli/service/connection.py b/dockge_cli/service/connection.py index 9fb063b..bcb3802 100644 --- a/dockge_cli/service/connection.py +++ b/dockge_cli/service/connection.py @@ -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): diff --git a/pyproject.toml b/pyproject.toml index 1412bbb..6371330 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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",