Migrate ActiveJob adapter from delayed_job to Sidekiq#2445
Draft
Migrate ActiveJob adapter from delayed_job to Sidekiq#2445
Conversation
- Replace delayed_job_active_record with sidekiq and redis gems - Update ActiveJob queue adapter configuration - Create sidekiq initializer with Redis and queue configuration - Replace lib/seek/workers.rb to manage Sidekiq processes - Update queue_names.rb to remove Delayed::Worker dependency - Update admin controller to work with Sidekiq workers - Update Seek::Util helper methods for Sidekiq - Add Redis service to docker-compose.yml - Update docker worker startup script to tail sidekiq.log - Remove delayed_job_config.rb initializer Co-authored-by: fbacall <503373+fbacall@users.noreply.github.com>
- Update admin controller tests to reference background job workers - Update clear_failed_jobs to use Sidekiq API instead of ActiveRecord - Remove obsolete delayed_jobs table check from seek_main.rb - Add Redis service to docker-compose-virtuoso.yml - Add Redis service to docker-compose-relative-root.yml Co-authored-by: fbacall <503373+fbacall@users.noreply.github.com>
- Add Errno::EINVAL to exception handling in process_running? - Extract PID file reading logic into private method to reduce duplication - Add comment explaining 24-hour timeout value in sidekiq.yml - Add comment explaining equal queue weights in sidekiq initializer Co-authored-by: fbacall <503373+fbacall@users.noreply.github.com>
- Create migration to drop delayed_jobs table - Add comprehensive migration notes for users upgrading to Sidekiq - Document Redis requirements and setup steps - Document troubleshooting and rollback procedures Co-authored-by: fbacall <503373+fbacall@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Migrate ActiveJob adapter from delayed_job to sidekiq
Migrate ActiveJob adapter from delayed_job to Sidekiq
Dec 5, 2025
Contributor
|
Issues: The default concurrency of 5 makes jobs extremely slow (when testing locally), possibly due to waiting for access to the database? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces delayed_job with Sidekiq for background job processing. Sidekiq provides better performance through Redis-backed queuing versus database-backed queuing, and is actively maintained.
Core Changes
delayed_job_active_recordwithsidekiq(> 7.0) and> 5.0)redis(:sidekiq, create Sidekiq initializer with Redis connection and queue configuration matching previous delayed_job setup (single retry, 24-hour timeout)lib/seek/workers.rbto manage Sidekiq processes while preserving existing rake task interface (seek:workers:start/stop/restart/status)clear_failed_jobsto use Sidekiq API (Sidekiq::DeadSet,Sidekiq::RetrySet) instead of ActiveRecord queriesInfrastructure
REDIS_URLenvironment variabledelayed_jobstable (irreversible)log/sidekiq.logBackward Compatibility
Rake tasks and admin interface unchanged. Added
delayed_job_pidsalias inSeek::Utilto maintain compatibility with existing code that checks worker status.Migration Path
Requires Redis running (localhost:6379 or
REDIS_URLenv var). SeeMIGRATION_NOTES_SIDEKIQ.mdfor installation steps and troubleshooting.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.