Skip to content

Count and display the number of specific background migration jobs

Enhanced the 030-await-sidekiq-drain.rb script to count and output how many specific background migration jobs there are. Allows us to better decide if we wish to ignore them or not.

Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/48226

Example output:

2018-08-09 19:49:45.293: ----------------------------------------------------------------------------------------
2018-08-09 19:49:45.293: NOTE: This script is in dry run mode and will not purge any queues
2018-08-09 19:49:45.293: Queues:
2018-08-09 19:49:45.293:   repository_update_mirror: 322
2018-08-09 19:49:45.293: Retries:
2018-08-09 19:49:45.293:   reactive_caching: 4
2018-08-09 19:49:45.293:   repository_import: 1
2018-08-09 19:49:45.293:   post_receive: 1
2018-08-09 19:49:45.293:   project_service: 1
2018-08-09 19:49:45.293:   repository_update_remote_mirror: 1
2018-08-09 19:49:45.293: Scheduled:
2018-08-09 19:49:45.293:   todos_destroyer:todos_destroyer_entity_leave: 43
2018-08-09 19:49:45.293:   todos_destroyer:todos_destroyer_project_private: 5
2018-08-09 19:49:45.293:   todos_destroyer:todos_destroyer_confidential_issue: 3
2018-08-09 19:49:45.293:   todos_destroyer:todos_destroyer_private_features: 9
2018-08-09 19:49:45.293:   delete_diff_files: 117
2018-08-09 19:49:45.293:   gitlab_shell: 44
2018-08-09 19:49:45.293:   background_migration: 121
2018-08-09 19:49:45.293:     MigrateStageIndex: 30
2018-08-09 19:49:45.293:     DeleteDiffFiles: 91
2018-08-09 19:49:45.293:   repository_update_remote_mirror: 1
2018-08-09 19:49:45.293:   reactive_caching: 12
2018-08-09 19:49:45.293: Busy jobs per worker type:
2018-08-09 19:49:45.293:   asap: 2
2018-08-09 19:49:45.293:   besteffort: 34
2018-08-09 19:49:45.293:   pages: 2
2018-08-09 19:49:45.293:   pipeline: 0
2018-08-09 19:49:45.293:   pullmirror: 39
2018-08-09 19:49:45.293:   realtime: 4
2018-08-09 19:49:45.293:   traces: 10
2018-08-09 19:49:45.293: Cron: 31 enabled out of 35 total
2018-08-09 19:49:45.293:
2018-08-09 19:49:45.293: Total Enqueued: 332 | Total Retries: 6 | Total Scheduled: 355
2018-08-09 19:49:45.293: --> Status: WAIT
Edited by Brett Walker

Merge request reports

Loading