gitlab-org--gitlab-foss/app/workers
Yorick Peterse 97731760d7
Re-organize queues to use for Sidekiq
Dumping too many jobs in the same queue (e.g. the "default" queue) is a
dangerous setup. Jobs that take a long time to process can effectively
block any other work from being performed given there are enough of
these jobs.

Furthermore it becomes harder to monitor the jobs as a single queue
could contain jobs for different workers. In such a setup the only
reliable way of getting counts per job is to iterate over all jobs in a
queue, which is a rather time consuming process.

By using separate queues for various workers we have better control over
throughput, we can add weight to queues, and we can monitor queues
better. Some workers still use the same queue whenever their work is
related. For example, the various CI pipeline workers use the same
"pipeline" queue.

This commit includes a Rails migration that moves Sidekiq jobs from the
old queues to the new ones. This migration also takes care of doing the
inverse if ever needed. This does require downtime as otherwise new jobs
could be scheduled in the old queues after this migration completes.

This commit also includes an RSpec test that blacklists the use of the
"default" queue and ensures cron workers use the "cronjob" queue.

Fixes gitlab-org/gitlab-ce#23370
2016-10-21 18:17:07 +02:00
..
concerns Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
repository_check Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
admin_email_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
build_coverage_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
build_email_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
build_finished_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
build_hooks_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
build_success_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
clear_database_cache_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
delete_user_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
email_receiver_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
emails_on_push_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
expire_build_artifacts_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
expire_build_instance_artifacts_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
git_garbage_collect_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
gitlab_shell_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
group_destroy_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
import_export_project_cleanup_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
irker_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
merge_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
new_note_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
pipeline_hooks_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
pipeline_metrics_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
pipeline_process_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
pipeline_success_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
pipeline_update_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
post_receive.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
project_cache_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
project_destroy_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
project_export_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
project_service_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
project_web_hook_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
prune_old_events_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
remove_expired_group_links_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
remove_expired_members_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
repository_archive_cache_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
repository_fork_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
repository_import_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
requests_profiles_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
stuck_ci_builds_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
system_hook_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
trending_projects_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00
update_merge_requests_worker.rb Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00