Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

slave_okay=True

  • Loading branch information...
commit 3a0274a2a810521b3188dd6549c4dee643797be9 1 parent 0b82b56
@japerk japerk authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  mongo_collcount
  2. +1 −1  mongo_collsize
  3. +1 −1  mongo_indexsize
View
2  mongo_collcount
@@ -36,7 +36,7 @@ settings_db = 'mydb'
def getCollstats():
- con = Connection(settings_host, int(settings_port))
+ con = Connection(settings_host, int(settings_port), slave_okay=True)
db = con[settings_db]
for coll in db.collection_names():
View
2  mongo_collsize
@@ -38,7 +38,7 @@ settings_fields = {'totalIndexSize': 'index', 'storageSize': 'storage', 'size':
def getCollstats():
- con = Connection(settings_host, int(settings_port))
+ con = Connection(settings_host, int(settings_port), slave_okay=True)
db = con[settings_db]
stats = db.command("collstats", settings_collection)
View
2  mongo_indexsize
@@ -36,7 +36,7 @@ settings_db = 'mydb'
def getCollstats():
- con = Connection(settings_host, int(settings_port))
+ con = Connection(settings_host, int(settings_port), slave_okay=True)
db = con[settings_db]
for coll in db.collection_names():
Please sign in to comment.
Something went wrong with that request. Please try again.