diff --git a/spinnman/spalloc/spalloc_job.py b/spinnman/spalloc/spalloc_job.py index 684978ff9..0a752ee2e 100644 --- a/spinnman/spalloc/spalloc_job.py +++ b/spinnman/spalloc/spalloc_job.py @@ -132,12 +132,16 @@ def create_transceiver(self) -> Transceiver: """ @abstractmethod - def wait_for_state_change(self, old_state: SpallocState) -> SpallocState: + def wait_for_state_change(self, old_state: SpallocState, + timeout: int = None) -> SpallocState: """ Wait until the allocation is not in the given old state. :param SpallocState old_state: The state that we are looking to change out of. + :param timeout: + The time to wait, or None to wait forever + :type timeout: int or None :return: The state that the allocation is now in. .. note:: @@ -146,10 +150,15 @@ def wait_for_state_change(self, old_state: SpallocState) -> SpallocState: """ @abstractmethod - def wait_until_ready(self): + def wait_until_ready(self, timeout: int = None, n_retries: int = None): """ Wait until the allocation is in the ``READY`` state. + :param timeout: The timeout or None to wait forever + :type timeout: int or None + :param n_retries: + The number of times to retry, or None to retry forever + :type n_retries: int or None :raises Exception: If the allocation is destroyed """