From 9eb8fc55fe41727f89d9a9b0b77491521d92d36d Mon Sep 17 00:00:00 2001 From: Daniela Soares Feitosa Date: Tue, 16 Aug 2011 18:32:11 -0300 Subject: [PATCH] Revert "Added begin/rescue when trying to kill solr" --- vendor/plugins/acts_as_solr_reloaded/lib/tasks/solr.rake | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/vendor/plugins/acts_as_solr_reloaded/lib/tasks/solr.rake b/vendor/plugins/acts_as_solr_reloaded/lib/tasks/solr.rake index 2eab4f5..16617a0 100644 --- a/vendor/plugins/acts_as_solr_reloaded/lib/tasks/solr.rake +++ b/vendor/plugins/acts_as_solr_reloaded/lib/tasks/solr.rake @@ -66,19 +66,13 @@ namespace :solr do require File.expand_path("#{File.dirname(__FILE__)}/../../config/solr_environment") fork do if File.exists?(SOLR_PID_FILE) - killed = false File.open(SOLR_PID_FILE, "r") do |f| pid = f.readline - begin - Process.kill('TERM', pid.to_i) - killed = true - rescue - puts "Solr could not be found at pid #{pid.to_i}. Removing pid file." - end + Process.kill('TERM', pid.to_i) end File.unlink(SOLR_PID_FILE) Rake::Task["solr:destroy_index"].invoke if ENV['RAILS_ENV'] == 'test' - puts "Solr shutdown successfully." if killed + puts "Solr shutdown successfully." else puts "PID file not found at #{SOLR_PID_FILE}. Either Solr is not running or no PID file was written." end -- libgit2 0.21.2