Skip to content

Instantly share code, notes, and snippets.

@raypereda
Created February 17, 2014 18:02
Show Gist options
  • Save raypereda/9055763 to your computer and use it in GitHub Desktop.
Save raypereda/9055763 to your computer and use it in GitHub Desktop.
require 'mongo'

primary = Mongo::MongoClient.from_uri('mongodb://nbuild:<password>@mongo3.nbuild.prd.atl.3dna.io/nbuild')
primary_collection = primary['nbuild']['oauth_access_tokens']
primary_collection.count
 # => 203
slave = Mongo::MongoClient.from_uri('mongodb://nbuild:<password>@mongo-delayed.nbuild.prd.atl.3dna.io/nbuild?slaveok=true')

slave_collection = slave['nbuild']['oauth_access_tokens']
slave_collection.count
 # => 128481
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment