Created
March 10, 2011 16:18
-
-
Save a-chernykh/864379 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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