lib/softwear/lib.rb in softwear-lib-1.2.1 vs lib/softwear/lib.rb in softwear-lib-1.2.2
- old
+ new
@@ -89,9 +89,17 @@
on roles(:sidekiq) do
execute 'sudo restart sidekiq-manager'
end
end
+ if defined?(Sunspot)
+ before :publishing, :reindex_solr do
+ on roles(:db) do
+ execute :rake, 'sunspot:solr', 'reindex'
+ end
+ end
+ end
+
# This is no longer necessary
# before :updating, :update_softwear_lib
after :publishing, :restart
desc 'Compile assets'