t4n1o commented on issue #19192:
URL: https://github.com/apache/airflow/issues/19192#issuecomment-1003723593


   ```
   from datetime import timedelta
   
   from airflow import DAG
   from airflow.operators.bash import BashOperator
   from airflow.utils.dates import days_ago
   
   
   default_args = {
       "owner": "t4n1o",
       "depends_on_past": False,
       "email": ["[email protected]"],
       "email_on_failure": True,
       "email_on_retry": False,
       "retries": 1,
       "retry_delay": timedelta(minutes=2),
       "max_active_runs_per_dag": 1,
   
   }
   with DAG(
       "Bitmex_Archives_Mirror",
       default_args=default_args,
       description="Mirror the archives from public.bitmex.com ",
       schedule_interval=timedelta(days=1),
       start_date=days_ago(2),
       tags=["raw price history"],
       catchup=False,
   ) as dag:
   
       t1 = BashOperator(
           task_id="download_csv_gz_archives",
           bash_command="umask 002 && cd /opt/soft/ &&"
           "/opt/soft/venv/bin/python -m 
soft.data_workflows.bitmex.archives_mirror",
       )
   
       t2 = BashOperator(
           task_id="process_archives_into_daily_csv_files",
           depends_on_past=False,
           bash_command="umask 002 && cd /opt/executables/bitmex_csvgz_parser 
&& ./parser",
           retries=3,
       )
   
   
       t1 >> t2
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to