How to run a worker from the console
Last updated on December 20, 2021
Sometimes you just want to test your worker in the console immediately. You can do so by defining a new instance of your worker class and pass any params that you might have
shell
1> MyWorker.new.perform(any_params)
This of course shouldn't be done in your code because Sidekiq is meant to be performed async.
Level up your web development skills
Get articles, guides and interviews right in your inbox. Join a community of fellow developers.
No spam. Unsubscribe at any time.