P E N C I L
Login
Operator

dag = DAG(

'_HLY_TEST',

default_args=default_args,

description='A simple tutorial DAG',

schedule_interval=timedelta(days=1),

start_date=days_ago(2),

tags=['example'],

)

t2 = BashOperator(

task_id='sleep',

depends_on_past=False,

bash_command='sleep 5',

retries=3,

dag=dag,

)

PythonOperator(

task_id='sleep_for_' + str(i),

python_callable=my_sleeping_function,

op_kwargs={'random_base': float(i) / 10},

dag=dag,

)

my_sleeping_function(ds, task_instance, **kwargs)

run_this_last = DummyOperator(

task_id='run_this_last',

dag=dag,

)