'Run the task to completion.
The task will sleep for `wait_time` seconds between steps. To avoid
sleeping, pass `None` for `wait_time`.'

def run_to_completion(self, wait_time=1, progress_callback=None):

    assert (self._runner is not None), 'Task    not    started'
    for step in self.as_task(progress_callback=progress_callback):
        self._sleep(wait_time)
