mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-04-13 09:42:01 +00:00
Splitting not master error and server selection timeout in mongo monitor.
This commit is contained in:
parent
1fdebf5c76
commit
2a8f8678dc
1 changed files with 5 additions and 3 deletions
|
@ -87,12 +87,14 @@ def db_check_mongo():
|
|||
|
||||
try:
|
||||
stories = db.stories.estimated_document_count()
|
||||
except (pymongo.errors.NotMasterError, pymongo.errors.ServerSelectionTimeoutError):
|
||||
except pymongo.errors.NotMasterError:
|
||||
abort(504)
|
||||
except pymongo.errors.ServerSelectionTimeoutError:
|
||||
abort(505)
|
||||
except pymongo.errors.OperationFailure as e:
|
||||
if 'Authentication failed' in str(e):
|
||||
abort(505)
|
||||
abort(506)
|
||||
abort(506)
|
||||
abort(507)
|
||||
|
||||
if not stories:
|
||||
abort(510)
|
||||
|
|
Loading…
Add table
Reference in a new issue