Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def mongo=(server)
case server
when String
host, port = server.split(':')
@con = Mongo::Connection.new(host, port)
@db = @con.db('monque')
@mongo = @db.collection('monque')
@workers = @db.collection('workers')
@failures = @db.collection('failures')
@stats = @db.collection('stats')
add_indexes
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.