File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,9 @@ def __init__(self, config: Config):
63
63
self .config = config
64
64
# client for mongo and elasticsearch via Splitgill
65
65
self .client = SplitgillClient (
66
- config .get_mongo_client (), config .get_elasticsearch_client ()
66
+ config .get_mongo_client (),
67
+ config .get_elasticsearch_client (),
68
+ config .get_mongo_database_name (),
67
69
)
68
70
69
71
# make sure the data path exists
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ def get_client(self) -> Elasticsearch:
19
19
class MongoConfig :
20
20
host : str = "localhost"
21
21
port : int = 27017
22
+ database : str = "sg"
22
23
23
24
def get_client (self ) -> MongoClient :
24
25
return MongoClient (self .host , self .port )
@@ -60,6 +61,9 @@ def get_elasticsearch_client(self) -> Elasticsearch:
60
61
def get_mongo_client (self ) -> MongoClient :
61
62
return self .mongo_config .get_client ()
62
63
64
+ def get_mongo_database_name (self ) -> str :
65
+ return self .mongo_config .database
66
+
63
67
64
68
class ConfigLoadError (Exception ):
65
69
def __init__ (self , reason : str ):
You can’t perform that action at this time.
0 commit comments