版本修改

This commit is contained in:
王文艳
2026-07-22 11:41:49 +08:00
parent 327b36e5a0
commit 9467a62152
9 changed files with 389 additions and 522 deletions
+23 -23
View File
@@ -1,23 +1,23 @@
from airflow.operators.bash import BashOperator
import pendulum
from airflow import DAG
with DAG(
dag_id="ai_stock_dag",
# 每天运行
schedule="30 8 * * 1-5",
start_date=pendulum.datetime(2025, 11, 10, tz="Asia/Shanghai"),
catchup=True,
tags=["ai_stock"],
) as dag:
t1 = BashOperator(
task_id='stock_strategy',
bash_command='python /opt/airflow/dags/repo/dags/ai/stock/stock_strategy.py',
)
t2 = BashOperator(
task_id='ai_stock',
bash_command='python /opt/airflow/dags/repo/dags/ai/stock/stock.py',
)
t1 >> t2
# from airflow.operators.bash import BashOperator
# import pendulum
# from airflow import DAG
#
# with DAG(
# dag_id="ai_stock_dag",
# # 每天运行
# schedule="30 8 * * 1-5",
# start_date=pendulum.datetime(2025, 11, 10, tz="Asia/Shanghai"),
# catchup=True,
# tags=["ai_stock"],
# ) as dag:
#
# t1 = BashOperator(
# task_id='stock_strategy',
# bash_command='python /opt/airflow/dags/repo/dags/ai/stock/stock_strategy.py',
# )
#
# t2 = BashOperator(
# task_id='ai_stock',
# bash_command='python /opt/airflow/dags/repo/dags/ai/stock/stock.py',
# )
# t1 >> t2