Sha256: 22cab618a85fc3adf296cc8bdd7ba0f417167b848149bf745dff4dc78b28c295
Contents?: true
Size: 1.24 KB
Versions: 1
Compression:
Stored size: 1.24 KB
Contents
namespace :sunspot do desc 'setup solr data dir' task :setup_solr_data_dir do on roles :app do within shared_path do execute :mkdir, "-p #{shared_path}/solr" end end end desc 'link to solr shared dirs' task :link_to_solr_shared_dirs do on roles :app do within shared_path do execute :rm, "-rf #{release_path}/solr/solr" execute :ln, "-s #{shared_path}/solr #{release_path}/solr" execute :ln, "-s #{shared_path}/pids #{release_path}/solr/pids" end end end desc 'start solr' task :start do on roles :app do within release_path do execute :rake, "sunspot:solr:start RAILS_ENV=#{fetch :stage}" end end end desc 'stop solr' task :stop do on roles :app do within release_path do execute :rake, "sunspot:solr:stop RAILS_ENV=#{fetch :stage};true" end end end desc 'reindex solr' task :reindex do on roles :app do within release_path do execute :rake, "sunspot:solr:reindex RAILS_ENV=#{fetch :stage};true" end end end end after 'deploy:check', 'sunspot:setup_solr_data_dir' before 'deploy:publishing', 'sunspot:link_to_solr_shared_dirs' before 'deploy:publishing', 'sunspot:reindex'
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
h2ocube_rails_sunspot-0.0.4 | lib/capistrano/tasks/sunspot.cap |