def printjob(self, job): # skip dynamic jobs that will be "executed" only in dryrun mode if self.dag.dynamic(job): return def format_files(job, io, ruleio, dynamicio): for f in io: f_ = ruleio[f] if f in dynamicio: yield "{} (dynamic)".format(f.format_dynamic()) else: yield f priority = self.dag.priority(job) logger.job_info(jobid=self.dag.jobid(job), msg=job.message, name=job.rule.name, local=self.workflow.is_local(job.rule), input=list(format_files(job, job.input, job.ruleio, job.dynamic_input)), output=list(format_files(job, job.output, job.ruleio, job.dynamic_output)), log=list(job.log), benchmark=job.benchmark, wildcards=job.wildcards_dict, reason=str(self.dag.reason(job)), resources=job.resources_dict, priority="highest" if priority == Job.HIGHEST_PRIORITY else priority, threads=job.threads) if job.dynamic_output: logger.info("Subsequent jobs will be added dynamically " "depending on the output of this rule")
def log_info(self, skip_dynamic=False, indent=False, printshellcmd=True): # skip dynamic jobs that will be "executed" only in dryrun mode if skip_dynamic and self.dag.dynamic(self): return priority = self.priority logger.job_info( jobid=self.dag.jobid(self), msg=self.message, name=self.rule.name, local=self.dag.workflow.is_local(self.rule), input=list(format_files(self, self.input, self.dynamic_input)), output=list(format_files(self, self.output, self.dynamic_output)), log=list(self.log), benchmark=self.benchmark, wildcards=self.wildcards_dict, reason=str(self.dag.reason(self)), resources=self.resources, priority="highest" if priority == Job.HIGHEST_PRIORITY else priority, threads=self.threads, indent=indent, is_checkpoint=self.rule.is_checkpoint, printshellcmd=printshellcmd, ) logger.shellcmd(self.shellcmd, indent=indent) if self.dynamic_output: logger.info( "Subsequent jobs will be added dynamically " "depending on the output of this job", indent=True, )
def printjob(self, job): # skip dynamic jobs that will be "executed" only in dryrun mode if self.dag.dynamic(job): return def format_files(job, io, dynamicio): for f in io: if f in dynamicio: yield "{} (dynamic)".format(f.format_dynamic()) else: yield f priority = self.dag.priority(job) logger.job_info( jobid=self.dag.jobid(job), msg=job.message, name=job.rule.name, local=self.workflow.is_local(job.rule), input=list(format_files(job, job.input, job.dynamic_input)), output=list(format_files(job, job.output, job.dynamic_output)), log=list(job.log), benchmark=job.benchmark, wildcards=job.wildcards_dict, reason=str(self.dag.reason(job)), resources=job.resources, priority="highest" if priority == Job.HIGHEST_PRIORITY else priority, threads=job.threads) if job.dynamic_output: logger.info("Subsequent jobs will be added dynamically " "depending on the output of this rule")