Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sidekiq sending jobs to test queue instead of developement queue

I've added specs to cover sidekiq jobs with rspec, but now, when I start a rails server, console, or just sidekiq, I have this warning:

WARNING: Sidekiq testing API enabled, but this is not the test environment.  Your jobs will not go to Redis.

And jobs are indeed not enqueued.

How can I switch back to the development API?

like image 525
Graham Slick Avatar asked Sep 14 '17 08:09

Graham Slick


2 Answers

You might want to check if you've included the gem 'rspec-sidekiq' in the group :development. If it's the case, remove it from there and only call it in the :test group.

like image 164
Thomas Geider Avatar answered Sep 28 '22 18:09

Thomas Geider


Following up on Thomas answer above, if you don't find the rspec-sidekiq gem in your Gemfile, check if any part of your project code (such as a sidekiq initializer) has code like this:

 require 'sidekiq/testing'
 Sidekiq::Testing.inline!
like image 25
Kelsey Hannan Avatar answered Sep 28 '22 18:09

Kelsey Hannan