def logs(self, execution, delay=10):
    """Jobs logs. In order.

    :param execution: `azkaban.remote.Execution`
    :param delay: Poll delay (in seconds) while job is preparing.

    """
    ok_statuses = set(['RUNNING', 'SUCCEEDED'])
    for job in self.ordered_jobs:
      while execution.status['status'] == 'PREPARING':
        # Delay log query until job is done preparing otherwise the log file
        # won't exist yet (and the server will send a 500 back).
        self._logger.warning('Job %s preparing.', job)
        sleep(delay)
      for line in execution.job_logs(job):
        yield line
      if not ok_statuses in execution.status['status']:
        raise AzkabanError('Job %s failed.', job)
      else:
        self._logger.info('Job %s finished.', job)
dataset/ETHPy150Open mtth/azkaban/azkaban/ext/pig.py/_PigProject.logs/swapped operands of `in`