Skip to content

Commit a5ea232

Browse files
committed
docs: improve log clean comments
1 parent e4bbb75 commit a5ea232

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

dags/airflow_log_cleanup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,14 +209,17 @@ def remove_process_lock_file(lock_filename: str) -> None:
209209
find_log_files_and_delete.partial(directory=directory).expand_kwargs(
210210
[
211211
{
212+
# Find the files whose modification time was 3 days aao
212213
"find_stmt_tpl": f"find %s/*/* -type f -mtime +{max_log_age_in_days}",
213214
"delete_stmt_tpl": "%s -exec rm -f {} \;",
214215
},
215216
{
217+
# Find the directory under base_log_folder/*/* that is empty
216218
"find_stmt_tpl": "find %s/*/* -type d -empty",
217219
"delete_stmt_tpl": "%s -prune -exec rm -rf {} \;",
218220
},
219221
{
222+
# Find the directory under base_log_folder/* that is empty
220223
"find_stmt_tpl": "find %s/* -type d -empty",
221224
"delete_stmt_tpl": "%s -prune -exec rm -rf {} \;",
222225
},

0 commit comments

Comments
 (0)