Skip to content

Commit

Permalink
Update analysisstore/server/astore.py
Browse files Browse the repository at this point in the history
Co-authored-by: Garrett Bischof <[email protected]>
  • Loading branch information
JunAishima and gwbischof authored Mar 7, 2024
1 parent 8a73811 commit 8082af4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions analysisstore/server/astore.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def __init__(self, config, testing=False):
if not testing:
try:
self.client = MongoClient(config["uri"])
# Proactively check that connection to server is working.
self.client.server_info()
except (pymongo.errors.ConnectionFailure, pymongo.errors.ServerSelectionTimeoutError):
raise AnalysisstoreException("Unable to connect to MongoDB server...")
Expand Down

0 comments on commit 8082af4

Please sign in to comment.