Commit bfec559e5c87b661e1dfe32fd9538c1ab327831a

Authored by Braulio Bhavamitra
1 parent fae296cb

Run solr_destroy with delayed_job

plugins/solr/lib/ext/article.rb
@@ -40,6 +40,7 @@ class Article @@ -40,6 +40,7 @@ class Article
40 :if => proc{ |a| ! ['RssFeed'].include?(a.class.name) } 40 :if => proc{ |a| ! ['RssFeed'].include?(a.class.name) }
41 41
42 handle_asynchronously :solr_save 42 handle_asynchronously :solr_save
  43 + handle_asynchronously :solr_destroy
43 44
44 def solr_plugin_comments_updated 45 def solr_plugin_comments_updated
45 solr_save 46 solr_save
plugins/solr/lib/ext/category.rb
@@ -15,6 +15,7 @@ class Category @@ -15,6 +15,7 @@ class Category
15 ] 15 ]
16 16
17 handle_asynchronously :solr_save 17 handle_asynchronously :solr_save
  18 + handle_asynchronously :solr_destroy
18 19
19 private 20 private
20 21
plugins/solr/lib/ext/product.rb
@@ -43,6 +43,7 @@ class Product @@ -43,6 +43,7 @@ class Product
43 :boost => proc{ |p| boost = 1; SolrPlugin::Boosts.each{ |b| boost = boost * (1 - ((1 - b[2].call(p)) * b[1])) }; boost} 43 :boost => proc{ |p| boost = 1; SolrPlugin::Boosts.each{ |b| boost = boost * (1 - ((1 - b[2].call(p)) * b[1])) }; boost}
44 44
45 handle_asynchronously :solr_save 45 handle_asynchronously :solr_save
  46 + handle_asynchronously :solr_destroy
46 47
47 private 48 private
48 49
plugins/solr/lib/ext/profile.rb
@@ -39,6 +39,7 @@ class Profile @@ -39,6 +39,7 @@ class Profile
39 :boost => proc{ |p| 10 if p.enabled } 39 :boost => proc{ |p| 10 if p.enabled }
40 40
41 handle_asynchronously :solr_save 41 handle_asynchronously :solr_save
  42 + handle_asynchronously :solr_destroy
42 43
43 class_inheritable_accessor :solr_plugin_extra_index_methods 44 class_inheritable_accessor :solr_plugin_extra_index_methods
44 self.solr_plugin_extra_index_methods = [] 45 self.solr_plugin_extra_index_methods = []