krisleech/wisper-sidekiq

Ability to delay a specific event?

MiralDesai opened this issue · 1 comments

Just reading over the docs for wisper sidekiq and I can't find anything about delaying a job being run. Which is a standard sidekiq feature.

So i've got an method in my class, that listens to an event, and it automatically goes through via sidekiq thanks to this gem. What about if I want to delay the process from running in sidekiq for 1 hour?

I'm already passing in sidekiq options to set the job to the correct queue, but can't find an option for setting a delay, or even a date to run at.

Hopefully this is the right place for this, cheers

There is not a way to delay a job being run.

It might be possible to add the feature to this gem, I'm not sure. I would accept a pull request for this feature.

As a side note you might want to check out WisperNext (unreleased) which will enable this much more easily: https://gitlab.com/kris.leech/wisper_next. This is, as yet, no sidekiq (or any other async adpaters) for wisper next, I hope someone will write them once released.