undefined method `delay' for #<Listeners::EmailListener:0x007ffabb5ac888>
jcavalieri opened this issue · 2 comments
jcavalieri commented
I have redis running, sidekiq installed, and when I broadcast I'm getting the following error:
undefined method
delay' for #Listeners::EmailListener:0x007ffabb5ac888`
Any ideas?
jcavalieri commented
I suspect a configuration issue, but not sure.
It works with non-sidekiq wisper. But as soon as I put the async true then it stops working.
I'm a little confused about whether or not the listener methods needs to be a class method or not. The non-sidekiq wisper only works with an instance method when I subscribe it as a global listener.
jcavalieri commented
Figured it out.
I was subscribing with an instance of the class rather than just the class.
So the answer is this:
- subscribe with a class (not instance)
- event method needs to be a class method
Hope that might help anyone else.
Closing the ticket.