fix error

This commit is contained in:
邱博亞 2021-11-09 18:23:19 +08:00
parent ed065e5cb3
commit b5fbe80a7c
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ module Feeds
begin
require File.expand_path('../../../app/models/site_feed', __FILE__)
require File.expand_path('../../../app/models/site_feed_annc', __FILE__)
if defined?(SiteFeed) && defined?(SiteFeedAnnc)
if ENV['worker_num']=='0' && File.basename($0) != 'rake' && !Rails.const_defined?('Console') && defined?(SiteFeed) && defined?(SiteFeedAnnc)
SiteFeed.each do |site_feed|
tmp = SiteFeedAnnc.where(feed_id: site_feed.id).first
if site_feed.disabled != true