Skip to content

Commit

Permalink
add retry
Browse files Browse the repository at this point in the history
  • Loading branch information
yanksyoon committed Mar 11, 2024
1 parent c818eaa commit 36f22af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src-docs/openstack_manager.py.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Create an instance config from charm data.

---

<a href="../src/openstack_manager.py#L235"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/utilities.py#L235"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>function</kbd> `create_instance`

Expand Down
3 changes: 2 additions & 1 deletion src/openstack_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from github_client import GithubClient
from github_type import RunnerApplication
from runner_type import GithubPath
from utilities import execute_command
from utilities import execute_command, retry

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -232,6 +232,7 @@ class InstanceLaunchError(Exception):
"""Exception representing an error during instance launch process."""


@retry(tries=5, delay=5, max_delay=60, backoff=2, local_logger=logger)
def create_instance(
cloud_config: dict[str, dict],
instance_config: InstanceConfig,
Expand Down

0 comments on commit 36f22af

Please sign in to comment.