Job Dependency Solver.
Warning
THIS MODULE DOES NOT HAVE STABLE PUBLIC API
Bases: plainbox.vendor.enum.Enum
Three classic colors for recursive graph visitor.
Bases: plainbox.impl.depmgr.DependencyError
Exception raised when a cyclic dependency is detected.
job that is affected by the dependency error.
Here it is the job that has a cyclic dependency on itself.
job that is affecting the affected_job.
Here it’s always the same as affected_job
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
Bases: plainbox.impl.depmgr.DependencyError
Exception raised when two jobs have the same id.
job that is affected by the dependency error.
Here it is the job that is already known by the system.
job that is affecting the affected_job.
Here it is the job that is clashing with another job already present in the system.
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
Bases: builtins.Exception
Exception raised when a dependency error is detected.
job that is affecting the affected_job.
This may be None in certain cases (eg, when the job does not exist and is merely referred to by id). If this job exists removing it SHOULD fix this problem from occurring.
This may be the same as affected_job
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
Bases: plainbox.impl.depmgr.DependencyError
Exception raised when a job has an unsatisfied dependency.
job that is affected by the dependency error.
Here it is the job that has a missing dependency.
job that is affecting the affected_job.
Here it is always None as we have not seen this job at all and that’s what’s causing the problem in the first place.
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
Bases: builtins.object
Dependency solver for Jobs.
Uses a simple depth-first search to discover the sequence of jobs that can run. Use the resolve_dependencies() class method to get the solution.
Solve the dependency graph expressed as a list of job definitions.
| Parameters: |
|
|---|
The visit_list, if specified, allows to consider only a part of the graph while still having access and knowledge of all jobs.
| Returns list: | the solution (a list of jobs to execute in order) |
|---|---|
| Raises: |
|
Bases: plainbox.impl.depmgr.DependencyError
Exception raised when an unknown job is mentioned.
Note
This class differs from DependencyMissingError in that the unknown job is not a dependency of anything. It can only happen when the job is explicitly mentioned in the list of jobs to visit.
job that is affected by the dependency error.
Here it’s a job that on the visit_list but not on the job_list.
job that is affecting the affected_job.
Here, it is always None.
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.