Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当 DAG 使用任务流 api 失败时,如何指定要运行的函数?使用旧样式,我可以指定一个函数来运行 on_failure,但我无法弄清楚或找到文档来使用带有 DAG 和任务运算符的任务流 api 来完成它。
@dag装饰器接受您在创建实例时可以传递的所有参数,DAG尤其是on_failure_callback. 装饰师也是如此@task。
@dag
DAG
on_failure_callback
@task
也on_failure_callback应该是一个接受context参数的函数。在您的示例中不是,没有Error when executing on_failure_callback错误吗?
context
Error when executing on_failure_callback