airflow TimeDeltaSensor fails with unsupported operand type

后端 未结 1 1114
慢半拍i
慢半拍i 2021-01-18 07:03

In my DAG I have a TimeDeltaSensor created using:

from datetime import datetime, timedelta
from airflow.operators.sens         


        
相关标签:
1条回答
  • 2021-01-18 07:17

    Looking into the source code you linked there is one line that strikes me as interesting in this case:

    target_dttm = dag.following_schedule(context['execution_date'])
    

    Which means: If you don't have setup a proper DAG schedule this component will try to add its time delta to None.

    I am not sure if the code in the question is just an example or the whole thing. My suggestion is: Add a DAG schedule with is other than None.

    0 讨论(0)
提交回复
热议问题