Skip to content

Instantly share code, notes, and snippets.

@zachinglis
Created September 7, 2010 07:35
Show Gist options
  • Save zachinglis/567995 to your computer and use it in GitHub Desktop.
Save zachinglis/567995 to your computer and use it in GitHub Desktop.
before "deploy:rollback:revision", "thinking_sphinx:stop_gracefully"
after "deploy:default", "thinking_sphinx:symlink"
after "deploy:default", "thinking_sphinx:ready"
namespace :thinking_sphinx do
task :stop_gracefully do
begin
thinking_sphinx.stop
rescue
puts "ThinkingSphinx is not running. No stop required."
end
end
desc "Configure, Index and then run Thinking Sphinx"
task :ready do
thinking_sphinx.configure
thinking_sphinx.index
thinking_sphinx.start
end
desc "Link up Sphinx's indexes."
task :symlink do
run "ln -nfs #{shared_path}/db/sphinx #{release_path}/db/sphinx"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment