Skip to content

Instantly share code, notes, and snippets.

@phinze
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phinze/a268c4e7b5fcdfc30cd1 to your computer and use it in GitHub Desktop.
Save phinze/a268c4e7b5fcdfc30cd1 to your computer and use it in GitHub Desktop.
notorious content migration
migrating_shard_id = 3276
Shard.find(migrating_shard_id).activate!
File.open('/tmp/media_ids', 'r') { |f| MediaObjects.all.each { |m| f.puts m.media_id } }
# then scp the file from job101-vpc to work00 of target notorious env
# https://apse2.nv.instructuremedia.com/admin/partners/2
canvas_partner_id = 2
File.readlines('/tmp/media_ids') do |media_id|
NotoriousImportWorker.perform_async(canvas_partner_id, media_id)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment