Skip to content

Commit c07128a

Browse files
committed
Fix the docstring for wait_for_idle
1 parent 48b5414 commit c07128a

1 file changed

Lines changed: 14 additions & 13 deletions

File tree

juju/model.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2574,47 +2574,48 @@ async def _get_source_api(self, url, controller_name=None):
25742574

25752575
async def wait_for_idle(self, apps=None, raise_on_error=True, raise_on_blocked=False,
25762576
wait_for_active=False, timeout=10 * 60, idle_period=15, check_freq=0.5,
2577-
status=None, wait_for_units=None, wait_for_exact_units=None):
2577+
status=None, wait_for_at_least_units=None, wait_for_exact_units=None):
25782578
"""Wait for applications in the model to settle into an idle state.
25792579
2580-
:param apps (list[str]): Optional list of specific app names to wait on.
2580+
:param List[str] apps: Optional list of specific app names to wait on.
25812581
If given, all apps must be present in the model and idle, while other
25822582
apps in the model can still be busy. If not given, all apps currently
25832583
in the model must be idle.
25842584
2585-
:param raise_on_error (bool): If True, then any unit or app going into
2585+
:param bool raise_on_error: If True, then any unit or app going into
25862586
"error" status immediately raises either a JujuAppError or a JujuUnitError.
25872587
Note that machine or agent failures will always raise an exception (either
25882588
JujuMachineError or JujuAgentError), regardless of this param. The default
25892589
is True.
25902590
2591-
:param raise_on_blocked (bool): If True, then any unit or app going into
2591+
:param bool raise_on_blocked: If True, then any unit or app going into
25922592
"blocked" status immediately raises either a JujuAppError or a JujuUnitError.
2593-
The defaul tis False.
2593+
The default is False.
25942594
2595-
:param wait_for_active (bool): If True, then also wait for all unit workload
2595+
:param bool wait_for_active: If True, then also wait for all unit workload
25962596
statuses to be "active" as well. The default is False.
25972597
2598-
:param timeout (float): How long to wait, in seconds, for the bundle settles
2598+
:param float timeout: How long to wait, in seconds, for the bundle settles
25992599
before raising an asyncio.TimeoutError. If None, will wait forever.
26002600
The default is 10 minutes.
26012601
2602-
:param idle_period (float): How long, in seconds, the agent statuses of all
2602+
:param float idle_period: How long, in seconds, the agent statuses of all
26032603
units of all apps need to be `idle`. This delay is used to ensure that
26042604
any pending hooks have a chance to start to avoid false positives.
26052605
The default is 15 seconds.
26062606
2607-
:param check_freq (float): How frequently, in seconds, to check the model.
2607+
:param float check_freq: How frequently, in seconds, to check the model.
26082608
The default is every half-second.
26092609
2610-
:param status (str): The status to wait for. If None, not waiting.
2610+
:param str status: The status to wait for. If None, not waiting.
26112611
The default is None (not waiting for any status).
26122612
2613-
:param wait_for_units (int): The least number of units to be expected before
2614-
going into the idle state.
2613+
:param int wait_for_at_least_units: The least number of units to go into the idle
2614+
state. wait_for_idle will return after that many units are available (across all the
2615+
given applications).
26152616
The default is 1 unit.
26162617
2617-
:param wait_for_exact_units (int): The exact number of units to be expected before
2618+
:param int wait_for_exact_units: The exact number of units to be expected before
26182619
going into the idle state. (e.g. useful for scaling down).
26192620
When set, takes precedence over the `wait_for_units` parameter.
26202621
"""

0 commit comments

Comments
 (0)