Fix rake bug.

This commit is contained in:
BoHung Chiu 2022-06-13 16:19:51 +08:00
parent 1633729511
commit 2067444a7e
1 changed files with 8 additions and 6 deletions

View File

@ -98,12 +98,14 @@ module Announcement
rescue => e
puts ['there_was_no_show_option_method',e]
end
begin
avoid_page_cache AnnsCache
avoid_page_cache BulletinFeedCache
avoid_page_cache BulletinFeed
rescue => e
puts ["avoid_page_cache", e.to_s]
if File.basename($0) != 'rake'
begin
avoid_page_cache AnnsCache
avoid_page_cache BulletinFeedCache
avoid_page_cache BulletinFeed
rescue => e
puts ["avoid_page_cache", e.to_s]
end
end
side_bar do
head_label_i18n 'announcement.announcement', icon_class: "icons-megaphone"