Guest User

Untitled

a guest
Jul 17th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. require 'vendor/plugins/thinking-sphinx/recipes/thinking_sphinx'
  2.  
  3. # ...
  4.  
  5. namespace :deploy do
  6.  
  7. task :rebuild_index, :roles => :app do
  8. thinking_sphinx.stop # turn off TS using the old production.sphinx.conf
  9. update
  10. thinking_sphinx.index
  11. thinking_sphinx.start
  12. restart
  13. end
  14.  
  15. end
  16.  
  17. task :symlink_sphinx_indexes, :roles => [:app] do
  18. run "ln -nfs #{shared_path}/db/sphinx #{current_path}/db/sphinx"
  19. end
  20.  
  21. # this is where i load my production configuration files
  22. task :update_config, :roles => [:app], :except => { :no_release => true } do
  23. # ...
  24. thinking_sphinx.configure
  25. end
  26.  
  27. before 'deploy:finalize_update', :symlink_sphinx_indexes
  28. before 'deploy:finalize_update', :update_config
Add Comment
Please, Sign In to add comment