From 5bb81c549b08b53d17040601fa6112b8e1e5959e Mon Sep 17 00:00:00 2001 From: Bohung Date: Mon, 29 Nov 2021 10:53:39 +0800 Subject: [PATCH] Fix bug. --- app/controllers/announcement_feeds_controller.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/controllers/announcement_feeds_controller.rb b/app/controllers/announcement_feeds_controller.rb index fa2b0d9..b761d67 100644 --- a/app/controllers/announcement_feeds_controller.rb +++ b/app/controllers/announcement_feeds_controller.rb @@ -2,6 +2,9 @@ require "rss" class AnnouncementFeedsController < ApplicationController include Admin::AnnouncementsHelper def feed + Thread.new do + BulletinFeedCache.all_of({:invalid_date.ne=>nil,:invalid_date.lte => Time.now}).delete_all + end uid = params[:uid] startdt = params[:start].blank? ? nil : params[:start] enddt = params[:end].blank? ? nil : params[:end]