Fix cache bug.

This commit is contained in:
邱博亞 2025-03-15 12:34:40 +08:00
parent 1af065b201
commit e2421ed482
1 changed files with 4 additions and 0 deletions

View File

@ -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']