Skip to content

Commit

Permalink
Add crontab entry to delete empty dirs from zip storage
Browse files Browse the repository at this point in the history
  Connects to #1081
  • Loading branch information
tallenaz committed Aug 23, 2018
1 parent 72871ba commit c6b32a1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config/schedule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,10 @@
find /sdr-transfers -mindepth 5 -type f -name "*.zip" -mtime +1 -exec bash -c 'TARGET="{}"; rm -v ${TARGET%ip}*' \;
END_OF_COMMAND
end

every :day, at: '1:15am', roles: [:cache_cleaner] do
set :output, standard: 'log/zip_cache_cleanup.log'
command <<-'END_OF_COMMAND'
find /sdr-transfers/ -not -path "*/\.*" -type d -empty -delete
END_OF_COMMAND
end

0 comments on commit c6b32a1

Please sign in to comment.