dag15_ePMC_search.py 902 B

1234567891011121314151617181920212223242526272829303132333435
  1. from datetime import timedelta
  2. from airflow.models import DAG
  3. from airflow.utils.dates import days_ago
  4. from airflow.operators.python_operator import PythonOperator
  5. from igf_airflow.utils.dag15_ePMC_search_utils import update_wiki_publication_page_func
  6. args = {
  7. 'owner': 'airflow',
  8. 'start_date': days_ago(2),
  9. 'retries': 1,
  10. 'retry_delay': timedelta(minutes=5),
  11. 'provide_context': True,
  12. 'email_on_failure': False,
  13. 'email_on_retry': False,
  14. 'catchup': False,
  15. 'max_active_runs': 1,
  16. }
  17. dag = \
  18. DAG(
  19. dag_id='dag15_ePMC_search',
  20. schedule_interval='0 0 8 * *',
  21. default_args=args,
  22. tags=['hpc'])
  23. with dag:
  24. ## TASK
  25. update_wiki_publication_page = \
  26. PythonOperator(
  27. task_id='update_wiki_publication_page',
  28. dag=dag,
  29. queue='hpc_4G',
  30. python_callable=update_wiki_publication_page_func)
  31. ## PUBLICATION
  32. update_wiki_publication_page