Skip to content

Commit

Permalink
F OpenNebula/one-aiops#569: add timeout for waiting nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioRobres committed Dec 18, 2024
1 parent c70dacb commit 55c5eae
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lithops/serverless/backends/one/one.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,9 @@ def deploy_runtime(self, docker_image_name, memory, timeout):
self._scale_oneke(self.nodes, 1)
return super().deploy_runtime(docker_image_name, memory, timeout)

def _wait_kubernetes_nodes(self, total):
def _wait_kubernetes_nodes(self, total, timeout=60):
super()._get_nodes()
while len(self.nodes) < total:
start_time = time.time()
while len(self.nodes) < total and time.time() - start_time < timeout:
time.sleep(1)
super()._get_nodes()

0 comments on commit 55c5eae

Please sign in to comment.