Skip to content

Commit f97e74c

Browse files
committed
feat: implement healthcheck start_interval
1 parent 5b76f88 commit f97e74c

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

docker/models/containers.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ def exec_run(self, cmd, stdout=True, stderr=True, stdin=False, tty=False,
181181
user (str): User to execute command as. Default: root
182182
detach (bool): If true, detach from the exec command.
183183
Default: False
184-
stream (bool): Stream response data. Default: False
184+
stream (bool): Stream response data. Ignored if ``detach`` is true.
185+
Default: False
185186
socket (bool): Return the connection socket to allow custom
186187
read/write operations. Default: False
187188
environment (dict or list): A dictionary or a list of strings in
@@ -401,7 +402,7 @@ def restart(self, **kwargs):
401402
timeout (int): Number of seconds to try to stop for before killing
402403
the container. Once killed it will then be restarted. Default
403404
is 10 seconds.
404-
405+
signal (str or int): The signal to send. Defaults to ``SIGTERM``
405406
Raises:
406407
:py:class:`docker.errors.APIError`
407408
If the server returns an error.
@@ -444,7 +445,7 @@ def stop(self, **kwargs):
444445
Args:
445446
timeout (int): Timeout in seconds to wait for the container to
446447
stop before sending a ``SIGKILL``. Default: 10
447-
448+
signal (str or int): The signal to send. Defaults to ``SIGTERM``
448449
Raises:
449450
:py:class:`docker.errors.APIError`
450451
If the server returns an error.

docker/types/healthcheck.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Healthcheck(DictType):
2626
start_period (int): Start period for the container to
2727
initialize before starting health-retries countdown in
2828
nanoseconds. It should be 0 or at least 1000000 (1 ms).
29-
start_interval (int): It is interval to be used by healthchecks during the start period in
29+
start_interval (int): It is interval to be used by healthchecks during the start period in
3030
nanoseconds. It should be 0 or at least 1000000 (1 ms).
3131
"""
3232
def __init__(self, **kwargs):
@@ -94,7 +94,7 @@ def start_period(self, value):
9494
@property
9595
def start_interval(self):
9696
return self['StartInterval']
97-
97+
9898
@start_interval.setter
9999
def start_interval(self, value):
100100
self['StartInterval'] = value

tests/integration/api_healthcheck_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,3 @@ def test_healthcheck_start_interval(self):
8282
self.tmp_containers.append(container)
8383
self.client.start(container)
8484
wait_on_health_status(self.client, container, "healthy")
85-

0 commit comments

Comments
 (0)