Add rake task to enable or disable sidekiq cron jobs
requested to merge 296981-add-rake-task-to-disable-enable-selected-background-jobs-when-enabling-disabling-maintenance into master
What does this MR do and why?
Add rake task to enable or disable sidekiq cron jobs. The task uses Sidekiq::Cron::Job.all.map(&:enable!)
to enable cron jobs and disable them.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After disable | After enable again |
---|---|---|
No task ran | Command bundle exec rails gitlab:sidekiq:cron:disable
|
bundle exec rails gitlab:sidekiq:cron:enable |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Visit any Admin>Monitoring>Background jobs https://gdk.test:3443/admin/background_jobs
- Run
bundle exec rails gitlab:sidekiq:cron:disable
- Refresh any Admin>Monitoring>Background jobs https://gdk.test:3443/admin/background_jobs
- Run
bundle exec rails gitlab:sidekiq:cron:enable
- Refresh any Admin>Monitoring>Background jobs https://gdk.test:3443/admin/background_jobs
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #296981