We're using Wisper and somehow one of our event is not registered. Here's our setup:
# event is defined
#
class SomeListener < BaseListener
# A working event
listen_to :bar_updated do |id|
...
end
# A buggy event
listen_to :foo_updated do |id|
...
end
end
# globally subscribed listener
#
Rails.application.config.to_prepare do
Wisper.subscribe(SomeListener, async: true)
end
# but
#
SomeListener.foo_updated(1)
# => NoMethodError: undefined method `foo_updated' for SomeListener:Class
# whereas other events work
#
SomeListener.bar_updated(1)
# 2022-11-25 16:17:51.240090 D [85591:114160 log_subscriber.rb:126] ActiveRecord::Base ...
# => nil
Any idea how it could happen ?
We've triple checked our files, looks like there's no obvious reason (like method merged into the one above, failed rebased, ...)