【发布时间】:2020-01-30 13:38:54
【问题描述】:
我正在尝试通过 Bash Operator 启动一个进程。
bash =BashOperator(
task_id='Trigger some dag',
bash_command='airflow trigger_dag -e "{{ next_execution_date }}" some_dag_id',
dag=dag,
)
我知道 Airflow 使用 Pendulum 来管理日期时间,所以通过查看文档,我尝试了 '.set' 方法
bash =BashOperator(
task_id='Trigger some dag',
bash_command='airflow trigger_dag -e "{{ next_execution_date.set(hour=someHour) }}" some_dag_id',
dag=dag,
)
但我收到错误 'pendulum.pendulum.Pendulum object' has no attribute 'set'。
我找不到更多文档。
如何更改 next_execution_date 的小时数?
【问题讨论】:
标签: python-3.x airflow pendulum