def update_dynamic(self, job):
    'Update the DAG by evaluating the output of the given job that\n        contains dynamic output files.'
    dynamic_wildcards = job.dynamic_wildcards
    if (not dynamic_wildcards):
        return
    depending = list(filter((lambda job_: (not self.finished(job_))), self.bfs(self.depending, job)))
    (newrule, non_dynamic_wildcards) = job.rule.dynamic_branch(dynamic_wildcards, input=False)
    self.specialize_rule(job.rule, newrule)
    newjob = self.new_job(newrule, format_wildcards=non_dynamic_wildcards)
    self.replace_job(job, newjob)
    for job_ in depending:
        needs_update = any(((f.get_wildcard_names() & dynamic_wildcards.keys()) for f in job_.rule.dynamic_input))
        if needs_update:
            newrule_ = job_.rule.dynamic_branch(dynamic_wildcards)
            if (newrule_ is not None):
                self.specialize_rule(job_.rule, newrule_)
                if (not self.dynamic(job_)):
                    logger.debug('Updating job {}.'.format(job_))
                    newjob_ = self.new_job(newrule_, targetfile=(job_.output[0] if job_.output else None))
                    unexpected_output = self.reason(job_).missing_output.intersection(newjob.existing_output)
                    if unexpected_output:
                        logger.warning('Warning: the following output files of rule {} were not present when the DAG was created:\n{}'.format(newjob_.rule, unexpected_output))
                    self.replace_job(job_, newjob_)
    return newjob
Update the DAG by evaluating the output of the given job that
contains dynamic output files.
def update_dynamic(self, job):
    'Update the DAG by evaluating the output of the given job that\n        contains dynamic output files.'
    dynamic_wildcards = job.dynamic_wildcards
    if (not dynamic_wildcards):
        return
    depending = list(filter((lambda job_: (not self.finished(job_))), self.bfs(self.depending, job)))
    (newrule, non_dynamic_wildcards) = job.rule.dynamic_branch(dynamic_wildcards, input=False)
    self.specialize_rule(job.rule, newrule)
    newjob = self.new_job(newrule, format_wildcards=non_dynamic_wildcards)
    self.replace_job(job, newjob)
    for job_ in depending:
        needs_update = any(((f.get_wildcard_names() & dynamic_wildcards.keys()) for f in job_.rule.dynamic_input))
        if needs_update:
            newrule_ = job_.rule.dynamic_branch(dynamic_wildcards)
            if (newrule_ is not None):
                self.specialize_rule(job_.rule, newrule_)
                if (not self.dynamic(job_)):
                    logger.debug('Updating job {}.'.format(job_))
                    newjob_ = self.new_job(newrule_, targetfile=(job_.output[0] if job_.output else None))
                    unexpected_output = self.reason(job_).missing_output.intersection(newjob.existing_output)
                    if unexpected_output:
                        logger.warning('Warning: the following output files of rule {} were not present when the DAG was created:\n{}'.format(newjob_.rule, unexpected_output))
                    self.replace_job(job_, newjob_)
    return newjob