コード例 #1
0
    def init_resources(self, context):  # pylint: disable=unused-argument
        # Needs to happen first, as it sets self.format, which is required by
        # _find_host_video_file
        self.validate()

        ensure_directory_exists(self.video_directory)
        self.host_video_file = self._find_host_video_file()
コード例 #2
0
    def init_resources(self, context):  # pylint: disable=unused-argument
        # Needs to happen first, as it sets self.format, which is required by
        # _find_host_video_file
        self.validate()

        ensure_directory_exists(self.video_directory)
        self.host_video_file = self._find_host_video_file()
コード例 #3
0
def init_job_output(run_output, job):
    output_name = '{}-{}-{}'.format(job.id, job.spec.label, job.iteration)
    path = os.path.join(run_output.basepath, output_name)
    ensure_directory_exists(path)
    write_pod(Result().to_pod(), os.path.join(path, 'result.json'))
    job_output = JobOutput(path, job.id, job.label, job.iteration, job.retries)
    job_output.spec = job.spec
    job_output.status = job.status
    run_output.jobs.append(job_output)
    return job_output
コード例 #4
0
 def failed_dir(self):
     path = os.path.join(self.basepath, '__failed')
     return ensure_directory_exists(path)