def init(self): """ Initialise the GC3Pie job backend. """ # List of config files for GC3Pie; non-existing ones will be # silently ignored. The list here copies GC3Pie's default, # for the principle of minimal surprise, but there is no # strict requirement that this be done and EB could actually # choose to use a completely distinct set of conf. files. self.config_files = gc3libs.Default.CONFIG_FILE_LOCATIONS[:] cfgfile = build_option('job_backend_config') if cfgfile: self.config_files.append(cfgfile) self.output_dir = build_option('job_output_dir') self.jobs = DependentTaskCollection(output_dir=self.output_dir) self.job_cnt = 0 # after polling for job status, sleep for this time duration # before polling again (in seconds) self.poll_interval = build_option('job_polling_interval')
def init(self): """ Initialise the GC3Pie job backend. """ # List of config files for GC3Pie; non-existing ones will be # silently ignored. The list here copies GC3Pie's default, # for the principle of minimal surprise, but there is no # strict requirement that this be done and EB could actually # choose to use a completely distinct set of conf. files. self.config_files = gc3libs.Default.CONFIG_FILE_LOCATIONS[:] cfgfile = build_option('job_backend_config') if cfgfile: self.config_files.append(cfgfile) self.output_dir = build_option('job_output_dir') self.job_cnt = 0 job_deps_type = build_option('job_deps_type') if job_deps_type is None: job_deps_type = JOB_DEPS_TYPE_ABORT_ON_ERROR self.log.info("Using default job dependency type: %s", job_deps_type) else: self.log.info("Using specified job dependency type: %s", job_deps_type) if job_deps_type == JOB_DEPS_TYPE_ALWAYS_RUN: self.jobs = DependentTaskCollection(output_dir=self.output_dir) elif job_deps_type == JOB_DEPS_TYPE_ABORT_ON_ERROR: self.jobs = AbortingDependentTaskCollection( output_dir=self.output_dir) else: raise EasyBuildError("Unknown job dependency type specified: %s", job_deps_type) # after polling for job status, sleep for this time duration # before polling again (in seconds) self.poll_interval = build_option('job_polling_interval')