potiuk commented on code in PR #33252:
URL: https://github.com/apache/airflow/pull/33252#discussion_r1290719808


##########
scripts/docker/clean-logs.sh:
##########
@@ -35,6 +35,9 @@ while true; do
     -type f -mtime +"${RETENTION}" -name '*.log' -print0 | \
     xargs -0 rm -f
 
+  find "${DIRECTORY}"/logs \
+    -type d -mtime +"${RETENTION}" -empty -delete

Review Comment:
   I think you should not use `-mtime` here at all. `-mtime` for directory is 
updated when file is removed for example - with means that if a file in the 
folder is removed, then it will remain empty fore RETENTION days. That makes 
very little sense. I think it makes much more sense if simply all empty 
directories are removed. There is no point in keepning them threre.



-- 
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