Permalink
Browse files

Make sure sphinx indexes exist before restarting

  • Loading branch information...
1 parent 5e2b28f commit 74bcfe42789c93a17add84e3c9c9911c04fee703 Eirik Dentz Sinclair committed Jun 15, 2009
View
7 cookbooks/climateculture_config/recipes/default.rb
@@ -34,9 +34,8 @@
execute "restart-monit-#{app}" do
command %Q{
- /usr/bin/monit stop all -g #{app} &&
- /usr/bin/monit reload &&
- /usr/bin/monit start all -g #{app}
- }
+ /usr/bin/monit stop all -g #{app} && \
+ /usr/bin/monit reload && \
+ /usr/bin/monit start all -g #{app} }
action :run
end
View
8 cookbooks/thinking_sphinx/recipes/default.rb
@@ -56,6 +56,14 @@
to "/data/#{app}/shared/config/thinkingsphinx"
end
+ execute "configure-sphinx" do
+ command "/engineyard/bin/thinking_sphinx_searchd climate_culture_app configure"
+ end
+
+ execute "configure-sphinx" do
+ command "/engineyard/bin/thinking_sphinx_searchd climate_culture_app reindex"
+ end
+
execute "restart-monit-sphinx" do
command "/usr/bin/monit reload && " +
"/usr/bin/monit restart all -g sphinx_#{app}"

0 comments on commit 74bcfe4

Please sign in to comment.