avoid timeout
This commit is contained in:
parent
2c16e3458f
commit
35153a0020
|
@ -21,12 +21,16 @@ module FeedModel
|
|||
end
|
||||
def do_before_save
|
||||
if self.class == Category
|
||||
Thread.new do
|
||||
SiteFeedAnnc.where(merge_with_category: self.id.to_s).each do |site_feed_annc|
|
||||
recreate_annc_cache(site_feed_annc)
|
||||
end
|
||||
end
|
||||
elsif self.class == SiteFeed
|
||||
if self.disabled != true
|
||||
Thread.new do
|
||||
recreate_annc_cache(self)
|
||||
end
|
||||
else
|
||||
tmp = SiteFeedAnnc.where(feed_id: self.id).first
|
||||
if !tmp.nil?
|
||||
|
|
Loading…
Reference in New Issue