Skip to content

Sidekiq management: move selected enqueued jobs to another queue

From #997 (closed), as part of the epic to migrate the catchall-k8s shard to use a single queue (and ultimately similar for other shards), we've been talking about management capabilities. In addition to being able to route new work, we may also need to manage existing queued jobs, in ways other than just deleting them outright.

Therefore, it is desirable to have a mechanism (Admin API or Rake task) to iterate over a redis queue and for all jobs that match a given pattern (probably Worker class, but potentially other characteristics) move them to a different queue. This target queue might or might not be one we're already listening too; the goal is to get problem jobs that are preventing normal operations into a safe place where we can handle them separately. This is distinct from just deleting them, where they may be legitimate and need to be processed eventually but we can't leave them where they are cluttering up a critical queue and preventing timely execution of other jobs.

This is not a blocker on the main epic, but should be considered in short order.