Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20180216121030_enqueue_verify_pages_domain_workers.rb « post_migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bf9bf4e660f7ca13c10e1d3e46ae697910fd194d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class EnqueueVerifyPagesDomainWorkers < ActiveRecord::Migration
  class PagesDomain < ActiveRecord::Base
    include EachBatch
  end

  def up
    PagesDomain.each_batch do |relation|
      ids = relation.pluck(:id).map { |id| [id] }
      PagesDomainVerificationWorker.bulk_perform_async(ids)
    end
  end

  def down
    # no-op
  end
end