def _resume_action(self, liveaction, wait_for_completion=True, sleep_delay=1.0):
        """
        :param sleep_delay: Number of seconds to wait during "is completed" polls.
        :type sleep_delay: ``float``
        """
        try:
            user = self.context.get("user", None)
            liveaction, _ = action_service.request_resume(liveaction, user)
        except Exception as e:
            liveaction.status = action_constants.LIVEACTION_STATUS_FAILED
            LOG.exception("Failed to schedule liveaction.")
            raise e

        while wait_for_completion and liveaction.status not in (
            action_constants.LIVEACTION_COMPLETED_STATES
            + [action_constants.LIVEACTION_STATUS_PAUSED]
        ):
            eventlet.sleep(sleep_delay)
            liveaction = action_db_util.get_liveaction_by_id(liveaction.id)

        return liveaction

        :param sleep_delay: Number of seconds to wait during "is completed" polls.
        :type sleep_delay: ``float``
        
contrib/runners/action_chain_runner/action_chain_runner/action_chain_runner.py