2019-01-03 12:48:30 +05:30
|
|
|
class EnqueueVerifyPagesDomainWorkers < ActiveRecord::Migration
|
2018-03-17 18:26:18 +05:30
|
|
|
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
|