def __init__(self, queued_job_id): self._db = QueuedJob.query.get(queued_job_id) self._logger = Logger.get_logger('Job {}'.format(queued_job_id), to_screen=True, queued_job=self._db) self._timestamp = datetime.datetime.utcnow().strftime('%Y%m%d%H%M%S') self._working_dir = tempfile.mkdtemp() self._context = dict(working_dir=self._working_dir, archive_path=self._archive_path, code_dir=self._code_dir, job_timestamp=self._timestamp, job=self._db.serialize()) self._db.tasks = self._db.job.tasks self._db.stages = self._db.job.stages db_session.commit() self._tasks = self._init_tasks(self._db.tasks) self._stages = self._db.stages
def __init__(self, queued_job_id): self._db = QueuedJob.query.get(queued_job_id) self._logger = Logger.get_logger('Job {}'.format(queued_job_id), to_screen=True, queued_job=self._db) self._timestamp = datetime.datetime.utcnow().strftime('%Y%m%d%H%M%S') self._working_dir = tempfile.mkdtemp() self._context = dict( working_dir=self._working_dir, archive_path=self._archive_path, code_dir=self._code_dir, job_timestamp=self._timestamp, job=self._db.serialize() ) self._db.tasks = self._db.job.tasks self._db.stages = self._db.job.stages db_session.commit() self._tasks = self._init_tasks(self._db.tasks) self._stages = self._db.stages
def __init__(self, log_level=logging.INFO): self._logger = Logger.get_logger('Queue Manager', to_screen=True)