CodexBloom - Programming Q&A Platform

implementing ActiveJob not processing scheduled jobs in Rails 7 with Sidekiq

πŸ‘€ Views: 2 πŸ’¬ Answers: 1 πŸ“… Created: 2025-06-11
ruby rails sidekiq activejob Ruby

I'm having a hard time understanding This might be a silly question, but Quick question that's been bugging me - I'm working with an scenario where my ActiveJob jobs that are scheduled using `perform_later` in Rails 7 are not being processed by Sidekiq... I have the following setup in my Job class: ```ruby class HardWorker < ApplicationJob queue_as :default def perform(*args) # Do something later puts 'Working...' end end ``` And I'm enqueuing the job with: ```ruby HardWorker.set(wait: 5.minutes).perform_later('some_argument') ``` However, when I check the Sidekiq dashboard, the job is present but stays in the "scheduled" state and never gets executed. I've ensured that Sidekiq is running properly and that I'm using the correct Redis settings. My `sidekiq.yml` configuration looks like this: ```yml :concurrency: 5 :queues: - default - mailers ``` I also verified that my environment is set to production in `config/environments/production.rb`, and I don’t see any errors in the Sidekiq logs. I've tried restarting both the Rails server and Sidekiq, but the jobs remain exploring. Is there a specific configuration I might be missing in Rails 7 or any known issues with scheduled jobs when using ActiveJob with Sidekiq? Any help would be appreciated! I'm working on a web app that needs to handle this. Is there a better approach? Is there a better approach? For reference, this is a production desktop app.