Documentation for checking background migration queue size is not accurate
Problem
In a Slack (internal) discussion, @smcgivern noted that running Sidekiq::Queue.new('background_migration').size
can return 0 if there are background migrations jobs scheduled but not enqueued.
In our docs we mention the above as the way to check if there are any jobs left before upgrading, however this might be misleading because there could still be jobs scheduled which did not run.
Further Details
A possible way to check if there are any scheduled but not enqueued jobs might be to also use ScheduledSet like Sidekiq::ScheduledSet.scan("BackgroundMigrationWorker").size