krisleech/wisper-sidekiq

undefined method `delay' for #<Listeners::EmailListener:0x007ffabb5ac888>

jcavalieri opened this issue · 2 comments

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?

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.

Figured it out.

I was subscribing with an instance of the class rather than just the class.

So the answer is this:

  1. subscribe with a class (not instance)
  2. event method needs to be a class method

Hope that might help anyone else.

Closing the ticket.