Skip to content

Commit

Permalink
Merge pull request #1225 from tgibson11/arctic-conn
Browse files Browse the repository at this point in the history
Use singleton MongoClient object when creating Arctic connection
  • Loading branch information
robcarver17 committed Jul 19, 2023
2 parents f7f201d + 7791391 commit 45f950c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sysdata/arctic/arctic_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@ def __init__(self, collection_name, mongo_db=None):
mongo_db = mongoDb()

database_name = mongo_db.database_name
host = mongo_db.host
hostname = mongo_db.host
client = mongo_db.client

# Arctic doesn't accept a port

store = Arctic(host)
store = Arctic(client)

self.database_name = database_name
self.collection_name = collection_name
self.host = host
self.host = hostname

self.store = store
self.library = self._setup_lib(store, database_name, collection_name)
Expand Down

0 comments on commit 45f950c

Please sign in to comment.