mirror of
https://github.com/NovaOSS/nova-api.git
synced 2024-11-25 18:33:57 +01:00
Update stats.py with env mongodb
This commit is contained in:
parent
d741a43b6b
commit
b09bf688b4
|
@ -26,7 +26,7 @@ class StatsManager:
|
|||
self.conn = AsyncIOMotorClient(os.getenv('MONGO_URI'))
|
||||
|
||||
async def _get_collection(self, collection_name: str):
|
||||
return self.conn['nova-core'][collection_name]
|
||||
return self.conn[os.getenv('MONGO_NAME', 'nova-test')][collection_name]
|
||||
|
||||
async def add_date(self):
|
||||
date = datetime.datetime.now(pytz.timezone('GMT')).strftime('%Y.%m.%d')
|
||||
|
|
Loading…
Reference in a new issue