From 92c23cdc3834869075deeb6887b29708df4ad4af Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Thu, 1 Jan 2015 04:48:10 +0000 Subject: [PATCH 1/2] parse logs fix --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index cfaab32a..73638f38 100644 --- a/Rakefile +++ b/Rakefile @@ -15,7 +15,7 @@ task :default => :test desc "parse logs" task :parse_logs => [:environment] do - Dir["/home/web/proxy/logs/*.log"].each do |log_path| + Dir[File.join($config['logs_path'], '*.log')].each do |log_path| hits = {} visits = {} visit_ips = {} From 3cf0714a292acb0994cfcbd4b389653151a779c5 Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Thu, 1 Jan 2015 05:06:05 +0000 Subject: [PATCH 2/2] skip bad images --- Rakefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index a27ae0d6..aeaad7b7 100644 --- a/Rakefile +++ b/Rakefile @@ -195,7 +195,10 @@ task :rebuild_thumbnails => [:environment] do path = '/'+full_path[1..full_path.length].join('/') if Pathname(path).extname.gsub('.', '').match Site::IMAGE_REGEX - ThumbnailWorker.new.perform username, path + begin + ThumbnailWorker.new.perform username, path + rescue Magick::ImageMagickError + end end end end