aershov aershov - 6 months ago 11
Ruby Question

Configure sidekiq to work without brocker in development environment

It would've been a nice feature to configure

sidekiq
to work synchronously on development environment - without installing and starting redis, no retrying and so on though I'm not saying that it is so hard to be done


For example celery has this feature as
CELERY_ALWAYS_EAGER=True
in settings


Does sidekiq have a support for this?

Answer

Yes, sidekiq supports this. From the sidekiq wiki:

require 'sidekiq/testing'
Sidekiq::Testing.inline!

That would run the jobs synchronously. If you want them to not run instead, you can use Sidekiq::Testing.fake!

Comments