def _retry_control_message(self, command: str, num_retry: int=3):
    from ..zmq import send_ctrl_message
    for retry in range(1, (num_retry + 1)):
        self.logger.debug(f'Sending {command} command for the {retry}th time')
        try:
            send_ctrl_message(self.runtime_ctrl_address, command, timeout=self._timeout_ctrl, raise_exception=True)
            break
        except Exception as ex:
            self.logger.warning(f'{ex!r}')
            if (retry == num_retry):
                raise ex
def _retry_control_message(self, command: str, num_retry: int=3):
    from ..zmq import send_ctrl_message
    for retry in range(1, (num_retry + 1)):
        self.logger.debug(f'Sending {command} command for the {retry}th time')
        try:
            send_ctrl_message(self.runtime_ctrl_address, command, timeout=self._timeout_ctrl, raise_exception=True)
            break
        except Exception as ex:
            self.logger.warning(f'{ex!r}')
            if (retry == num_retry):
                raise ex