Commit e96b8c23 authored by Timothy Ardha's avatar Timothy Ardha

Update 1_mgate.py

parent b6cedbbd
...@@ -162,7 +162,7 @@ with DAG("APJ_1_mgate", ...@@ -162,7 +162,7 @@ with DAG("APJ_1_mgate",
delete_before = BashOperator( delete_before = BashOperator(
task_id="delete_before", task_id="delete_before",
bash_command=f""" bash_command=f"""
cd {Variable.get("LOCAL_PATH")}{DS_FOLDER}/ && rm {yesterday_lusa}.zip cd {Variable.get("LOCAL_PATH")}{DS_FOLDER}/ && rm -rf {yesterday_lusa}
""" """
) )
...@@ -269,14 +269,14 @@ with DAG("APJ_1_mgate", ...@@ -269,14 +269,14 @@ with DAG("APJ_1_mgate",
zip_today = BashOperator( zip_today = BashOperator(
task_id="zip_today", task_id="zip_today",
bash_command=f""" bash_command=f"""
cd /opt/airflow/dags/DFE/{DS_FOLDER}/ && zip -r {yesterday_nodash}.zip {yesterday_nodash}; cd /opt/airflow/dags/DFE/{DS_FOLDER}/{yesterday_nodash} && zip -r {yesterday_nodash}.zip {yesterday_nodash}*;
""" """
) )
delete_today = BashOperator( delete_today = BashOperator(
task_id="delete_today", task_id="delete_today",
bash_command=f""" bash_command=f"""
rm -rf /opt/airflow/dags/DFE/{DS_FOLDER}/{yesterday_nodash}; rm /opt/airflow/dags/DFE/{DS_FOLDER}/{yesterday_nodash}/{yesterday_nodash}*csv;
""", """,
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment