From be06be0a78d19c1f32e45b7042b0b15a2f57da57 Mon Sep 17 00:00:00 2001 From: gabrielwol <80077912+gabrielwol@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:22:58 +0000 Subject: [PATCH] #1115 invalid escape sequence - log_cleanup --- dags/log_cleanup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dags/log_cleanup.py b/dags/log_cleanup.py index d5de0b597..a368bebb7 100644 --- a/dags/log_cleanup.py +++ b/dags/log_cleanup.py @@ -99,10 +99,10 @@ def create_dag(filepath, doc, start_date, schedule_interval): if [ $TYPE == file ]; then FIND_STATEMENT="find ${BASE_LOG_FOLDER}/*/* -type f -mtime +${MAX_LOG_AGE_IN_DAYS}" - DELETE_STMT="${FIND_STATEMENT} -exec rm -f {} \;" + DELETE_STMT="${FIND_STATEMENT} -exec rm -f {} \\;" else FIND_STATEMENT="find ${BASE_LOG_FOLDER}/*/* -type d -empty" - DELETE_STMT="${FIND_STATEMENT} -prune -exec rm -rf {} \;" + DELETE_STMT="${FIND_STATEMENT} -prune -exec rm -rf {} \\;" fi echo "Executing Find Statement: ${FIND_STATEMENT}" FILES_MARKED_FOR_DELETE=`eval ${FIND_STATEMENT}`