From 3ddef19a29308cf574c395952efe88e9fae7a2ad Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Wed, 14 Nov 2012 23:15:44 +0600 Subject: [PATCH] [refs #90] fix deleting old temporary git repos --- lib/tasks/pull_requests.rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tasks/pull_requests.rake b/lib/tasks/pull_requests.rake index ec8d1f2f3..010012a19 100644 --- a/lib/tasks/pull_requests.rake +++ b/lib/tasks/pull_requests.rake @@ -4,8 +4,8 @@ namespace :pull_requests do task :clear => :environment do Dir.chdir(File.join(APP_CONFIG['git_path'], 'temp_pull_requests')) do say "Removing repos older one day:" - say `find -mindepth 2 -maxdepth 2 -type d -mtime +0` - `find -mindepth 2 -maxdepth 2 -type d -mtime +0 | xargs rm -rf` + say `find -mindepth 3 -maxdepth 3 -type d -mtime +0` + `find -mindepth 3 -maxdepth 3 -type d -mtime +0 | xargs rm -rf` say '-----' say "Removing empty dir:" say `find -maxdepth 2 -type d -empty`