Global flags (as in, global vars) are not recommended, because it makes the code less reuseable. There is no "simple" api for this, although it's doable using the execution context (basically, a namespace that only lives the lifetime of an execution)
As you ask, there are api in "NodeExecutionContext" to do so, but not in "GraphExecutionContext", which is the one returned by bonobo.run(...). So I'm a bit reluctant to give you a recipe for that ... Still
You can also use UnrecoverrableError but this is a bit like hitting CTRL-C, it will stop as computerly fast as possible, and that's not the wanted behaviour you describe.
[15 h 50]
Ideally, there would be a context.setdefault('my_errors', global=True) that does the same, good enhancement for 0.7 :sourire:
Global flags (as in, global vars) are not recommended, because it makes the code less reuseable. There is no "simple" api for this, although it's doable using the execution context (basically, a namespace that only lives the lifetime of an execution)
As you ask, there are api in "NodeExecutionContext" to do so, but not in "GraphExecutionContext", which is the one returned by bonobo.run(...). So I'm a bit reluctant to give you a recipe for that ... Still
You can also use UnrecoverrableError but this is a bit like hitting CTRL-C, it will stop as computerly fast as possible, and that's not the wanted behaviour you describe. [15 h 50] Ideally, there would be a context.setdefault('my_errors', global=True) that does the same, good enhancement for 0.7 :sourire: