Commit 9eb8fc55fe41727f89d9a9b0b77491521d92d36d

Authored by Daniela Feitosa
1 parent 4ea10045

Revert "Added begin/rescue when trying to kill solr"

This reverts commit 4e61bfb7a04ef3a7171343867aca05c4ce401197.

There are some problems with solr
(ActionItem1958)
vendor/plugins/acts_as_solr_reloaded/lib/tasks/solr.rake
... ... @@ -66,19 +66,13 @@ namespace :solr do
66 66 require File.expand_path("#{File.dirname(__FILE__)}/../../config/solr_environment")
67 67 fork do
68 68 if File.exists?(SOLR_PID_FILE)
69   - killed = false
70 69 File.open(SOLR_PID_FILE, "r") do |f|
71 70 pid = f.readline
72   - begin
73   - Process.kill('TERM', pid.to_i)
74   - killed = true
75   - rescue
76   - puts "Solr could not be found at pid #{pid.to_i}. Removing pid file."
77   - end
  71 + Process.kill('TERM', pid.to_i)
78 72 end
79 73 File.unlink(SOLR_PID_FILE)
80 74 Rake::Task["solr:destroy_index"].invoke if ENV['RAILS_ENV'] == 'test'
81   - puts "Solr shutdown successfully." if killed
  75 + puts "Solr shutdown successfully."
82 76 else
83 77 puts "PID file not found at #{SOLR_PID_FILE}. Either Solr is not running or no PID file was written."
84 78 end
... ...