Skip to content

Commit

Permalink
apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
rgildein committed Dec 6, 2023
1 parent 6018604 commit aee9a35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions cou/steps/plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,8 @@ async def generate_plan(analysis_result: Analysis, backup_database: bool) -> Upg
coro=analysis_result.model.wait_for_idle(
# NOTE (rgildein): We need to DEFAULT_TIMEOUT so it's possible to change if
# a network is too slow, this could cause an issue.
# Since the default timeout is 10 seconds, we need to add 1 second to it to make
# sure that timeout is greater than idle_period. At the same time, we are using max
# function to ensure lower timeout used it here is always at least 11.
# We are using max function to ensure timeout is always at least 11 (1 second
# higher than the idle_period to prevent false negative).
timeout=max(DEFAULT_TIMEOUT + 1, 11),
idle_period=10,
raise_on_blocked=True,
Expand Down
4 changes: 2 additions & 2 deletions cou/utils/juju_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,9 @@ async def wait_for_idle(
to avoid false positives.
:type idle_period: int
:param apps: Applications to wait, defaults to None
:type apps: Optional[list[str]], optional
:type apps: Optional[list[str]]
:param raise_on_blocked: If any unit or app going into "blocked" status immediately raises
WaitForApplicationsTimeout.
WaitForApplicationsTimeout, defaults to False.
:type raise_on_blocked: bool
"""

Expand Down

0 comments on commit aee9a35

Please sign in to comment.