从环境变量获取mongo连接
This commit is contained in:
parent
9198ca18f4
commit
ccc0859f12
@ -17,8 +17,7 @@ class Config:
|
||||
'consumer_id': 'geshouccs_consumer'
|
||||
}
|
||||
|
||||
# local_mongo_uri = os.environ["local_mongo_uri"]
|
||||
local_mongo_uri = 'mongodb://root:iamciniao@127.0.0.1:27017/?authSource=admin&readPreference=primary&ssl=false'
|
||||
local_mongo_uri = os.environ["local_mongo_uri"]
|
||||
mdb_clint = pymongo.MongoClient(local_mongo_uri)
|
||||
mydb = mdb_clint["admin_game"]
|
||||
admin_game_coll = mydb['game']
|
||||
|
Loading…
Reference in New Issue
Block a user