ExternalTaskSensor假定您依赖于具有相同执行日期的dag运行中的任务。
这意味着在您的情况下,您会拖延
a并且
b需要按照相同的时间表运行(例如,每天的9:00 am或w / e)。
否则,您需要在实例化时使用
execution_delta或。
execution_date_fn``ExternalTaskSensor
这是运算符内部的文档,以帮助进一步阐明:
:param execution_delta: time difference with the previous execution to look at, the default is the same execution_date as the current task. For yesterday, use [positive!] datetime.timedelta(days=1). Either execution_delta or execution_date_fn can be passed to ExternalTaskSensor, but not both.:type execution_delta: datetime.timedelta:param execution_date_fn: function that receives the current execution date and returns the desired execution date to query. Either execution_delta or execution_date_fn can be passed to ExternalTaskSensor, but not both.:type execution_date_fn: callable



