diff --git a/plugins/module_utils/vendor/hcloud/_client.py b/plugins/module_utils/vendor/hcloud/_client.py index 73b7872..6f1fdad 100644 --- a/plugins/module_utils/vendor/hcloud/_client.py +++ b/plugins/module_utils/vendor/hcloud/_client.py @@ -86,8 +86,8 @@ class Client: _version = __version__ __user_agent_prefix = "hcloud-python" - _retry_interval = exponential_backoff_function( - base=1.0, multiplier=2, cap=60.0, jitter=True + _retry_interval = staticmethod( + exponential_backoff_function(base=1.0, multiplier=2, cap=60.0, jitter=True) ) _retry_max_retries = 5 @@ -294,7 +294,6 @@ class Client: error["code"] == "rate_limit_exceeded" and retries < self._retry_max_retries ): - # pylint: disable=too-many-function-args time.sleep(self._retry_interval(retries)) retries += 1 continue diff --git a/plugins/module_utils/vendor/hcloud/_version.py b/plugins/module_utils/vendor/hcloud/_version.py index 4e4565f..0dbaa6b 100644 --- a/plugins/module_utils/vendor/hcloud/_version.py +++ b/plugins/module_utils/vendor/hcloud/_version.py @@ -1,3 +1,3 @@ from __future__ import annotations -__version__ = "2.1.0" # x-release-please-version +__version__ = "2.1.1" # x-release-please-version diff --git a/plugins/module_utils/vendor/hcloud/actions/client.py b/plugins/module_utils/vendor/hcloud/actions/client.py index 85fc007..a3d6b03 100644 --- a/plugins/module_utils/vendor/hcloud/actions/client.py +++ b/plugins/module_utils/vendor/hcloud/actions/client.py @@ -28,14 +28,18 @@ class BoundAction(BoundModelBase, Action): max_retries = self._client._client._poll_max_retries retries = 0 - while self.status == Action.STATUS_RUNNING: + while True: + self.reload() + if self.status != Action.STATUS_RUNNING: + break + + retries += 1 if retries < max_retries: - self.reload() - retries += 1 # pylint: disable=protected-access time.sleep(self._client._client._poll_interval_func(retries)) - else: - raise ActionTimeoutException(action=self) + continue + + raise ActionTimeoutException(action=self) if self.status == Action.STATUS_ERROR: raise ActionFailedException(action=self)