bartongroup / slivka

http://bartongroup.github.io/slivka/
Apache License 2.0
7 stars 3 forks source link

Specify mongo database name in the configuration file. #77

Closed warownia1 closed 4 years ago

warownia1 commented 4 years ago

Since multiple separate Slivka instances may use the same database, it's necessary to specify the database name for each project individually instead of hard-coded "slivkadb".

Options include:

warownia1 commented 4 years ago

If passed a string, strip database name and pass the rest directly to the pymongo.MongoClient

host, dbname = hostname.rsplit('/', 1)
database = MongoClient(host)[dbname]
warownia1 commented 4 years ago

Closed by e0ff034758b55642a371b5c20e60059c7cec1ed3