Ruby version: 2.3.3
Sidekiq version(s): 4.2.2
Rails 4.2.7
If relevant, please include your initializer and any error message with the full backtrace.
no error messages.
when trying to start a sidekiq job from a Rake task, nothing happens.
require 'sidekiq/api'
namespace :db do
task migrate_rewiews_to_scoring_periods: [:environment] do
MyModel.find_each do |this|
MyWorker.perform_async( this.id )
end
end
end
You are requiring 'sidekiq/testing' or rspec-sidekiq somewhere so your jobs are going into a local array for test assertion, not into Redis.
this is not for testing ... i'm trying to create Sidekiq jobs from a Rake task..
and the workers are not picking it up.
Looks like the Sidekiq client config is not done correctly for rake tasks?
How can I fix this?
I did not say it was for testing. I said you are requiring it anyhow, probably in your Gemfile. Read the IMPORTANT note here:
Thank you, Mike! You are definitely psychic! :)
Somebody required 'sidekiq/testing' in another rake task - it beats me why they would do such a thing.
I guess that's what you get when you inherit a messy code base :-/
I can't believe I guessed correctly.

well, you must have gotten that question a gazillion times! :-D
Most helpful comment
I can't believe I guessed correctly.