Fix cache bug.
This commit is contained in:
parent
1af065b201
commit
e2421ed482
|
@ -26,6 +26,10 @@ module EventNewsMod
|
|||
setting.save
|
||||
end
|
||||
|
||||
#solve bug for thousands of generated feed cache
|
||||
if EventNewsFeedCache.count > EventNewsFeed.count*5
|
||||
EventNewsFeedCache.collection.drop
|
||||
end
|
||||
EventNewsFeedCache.regenerate_all
|
||||
|
||||
puts ['event news migrate end']
|
||||
|
|
Loading…
Reference in New Issue