Created
June 21, 2011 17:40
-
-
Save joesavak/1038415 to your computer and use it in GitHub Desktop.
sunspot bounce in deploy.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set somevars, "foobar" | |
namespace :deploy do | |
task :default do | |
update | |
someother_task | |
reindex_solr | |
end | |
task :reindex_solr do | |
rails_env = fetch(:rails_env, "test") | |
begin | |
run "cd #{current_path}; #{rake} RAILS_ENV=#{rails_env} sunspot:solr:stop" | |
rescue Exception => e | |
puts e.message | |
puts "!!!!!!!!!!!!!!! Solr does not appear to be up running" | |
end | |
run "cd #{current_path}; #{rake} RAILS_ENV=#{rails_env} sunspot:solr:start" | |
run "cd #{current_path}; #{rake} RAILS_ENV=#{rails_env} sunspot:reindex" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment