我在 app/listeners 目录中有 wisper 监听器。
我也有 /config/initializers/wisper.rb
module Wisper
def self.setup
configure do |config|
config.broadcaster(:default, Broadcasters::LoggerBroadcaster.new(Rails.logger, Broadcasters::SendBroadcaster.new))
end
end
end
Wisper.setup
Wisper.subscribe(ProjectListener.new)
Wisper.subscribe(FeedListener.new)
我可以以某种方式强制 Rails 在每次请求时重新加载侦听器吗?