Commit 12575b5c authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

update dags

parent 77b0b940
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -220,7 +220,7 @@ for instrument in default_args.keys():
        default_args=this_default_args,
        description=f"CSST {instrument} L1 pipeline conditional trigger.",
        start_date=datetime(2025, 1, 1),
        schedule="@yearly",
        # schedule="@yearly",
        catchup=False,
        tags={instrument, "L1", "conditional trigger"},
    ) as dag:
+0 −0

Empty file added.

+15 −20
Original line number Diff line number Diff line
@@ -3,37 +3,32 @@ from airflow.operators.bash import BashOperator
from datetime import datetime, timedelta

default_args = {
    'owner': 'airflow',
    'depends_on_past': False,
    'email': ['bozhang@nao.cas.cn'],
    'email_on_failure': False,
    'email_on_retry': False,
    'retries': 1,
    'retry_delay': timedelta(minutes=5),
    'params': {
        'example_param': 'example_value',
        'a':1,
        'b':2,
        'c':3
    },
    "owner": "airflow",
    "depends_on_past": False,
    "email": ["bozhang@nao.cas.cn"],
    "email_on_failure": False,
    "email_on_retry": False,
    "retries": 1,
    "retry_delay": timedelta(minutes=5),
    "params": {"example_param": "example_value", "a": 1, "b": 2, "c": 3},
}

with DAG(
    dag_id='dag_hello_world',
    dag_id="dag_hello_world",
    default_args=default_args,
    description='A simple tutorial DAG',
    description="A simple tutorial DAG",
    start_date=datetime(2023, 1, 1),
    schedule="@daily",
    catchup=False,
    tags=['example'],
    tags={"example"},
) as dag:
    t1 = BashOperator(
        task_id='print_date',
        bash_command='date',
        task_id="print_date",
        bash_command="date",
    )
    t2 = BashOperator(
        task_id='sleep',
        bash_command='sleep 5',
        task_id="sleep",
        bash_command="sleep 5",
        retries=3,
    )
    t1 >> t2
+10 −0
Original line number Diff line number Diff line
from csst_dfs_client import dag

# find dag_run's
dag_run_list = dag.find(
    code < 0,
)

for dag_run in dag_run_list:
    code = dag.get_code_from_scalebox(dag_run)
    dag.update_code(code)