How to get list sheduled migration jobs

Hi,
I’m using gitlab 11.1.3 and want to update to the latest version. During the update, sidekiq scheduled jobs are performed. How can I print a list of them to the console?

Hi,

the rails console commands for sidekiq are documented in view the queue size and inspect all jobs in the queue. I’m not sure though if 11.x supports these commands already.

Cheers,
Michael

how to run this code from cmd?

queue = Sidekiq::Queue.new("chaos:chaos_sleep")
queue.each do |job|
  # job.klass # => 'MyWorker'
  # job.args # => [1, 2, 3]
  # job.jid # => jid
  # job.queue # => chaos:chaos_sleep
  # job["retry"] # => 3
  # job.item # => {
  #   "class"=>"Chaos::SleepWorker",
  #   "args"=>[1000],
  #   "retry"=>3,
  #   "queue"=>"chaos:chaos_sleep",
  #   "backtrace"=>true,
  #   "queue_namespace"=>"chaos",
  #   "jid"=>"39bc482b823cceaf07213523",
  #   "created_at"=>1566317076.266069,
  #   "correlation_id"=>"c323b832-a857-4858-b695-672de6f0e1af",
  #   "enqueued_at"=>1566317076.26761},
  # }

  # job.delete if job.jid == 'abcdef1234567890'
end

Thanks!

All the commands shown in the documentation section need to be run in GitLab Rails console: Rails console | GitLab

Thanks!