Dependency utilities
Authors:
Bases: object
Dependency decorator, for use with tasks.
@depend lets you define a function for engine dependencies just like you use apply for tasks.
Examples
@depend(df, a,b, c=5)
def f(m,n,p)
view.apply(f, 1,2,3)
will call df(a,b,c=5) on the engine, and if it returns False or raises an UnmetDependency error, then the task will not be run and another engine will be tried.
Bases: object
A function that depends on another function. This is an object to prevent the closure used in traditional decorators, which are not picklable.
Bases: set
An object for representing a set of msg_id dependencies.
Subclassed from set().
| Parameters : | dependencies: list/set of msg_ids or AsyncResult objects or output of Dependency.as_dict() :
all : bool [default True]
success : bool [default True]
failure : bool [default False]
If `all=success=True` and `failure=False`, then the task will fail with an ImpossibleDependency :
|
|---|
Represent this dependency as a dict. For json compatibility.
check whether our dependencies have been met.
return whether this dependency has become impossible.