Coverage for airflow.example_dags.example_python_operator : 80%
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
|
datetime.min.time())
'owner': 'airflow', 'start_date': seven_days_ago, }
'''This is a function that will run within the DAG execution''' time.sleep(random_base)
pprint(kwargs) print(ds) return 'Whatever you return gets printed in the logs'
task_id='print_the_context', provide_context=True, python_callable=print_context, dag=dag)
''' Generating 10 sleeping task, sleeping from 0 to 9 seconds respectively ''' task_id='sleep_for_'+str(i), python_callable=my_sleeping_function, op_kwargs={'random_base': i}, dag=dag)
|