Took out env vars extracting to config.py

This commit is contained in:
norohind committed 2021-11-28 16:57:55 +03:00
1 parent 803b6cce7c
commit d30bc56c9e
7 files changed
+38 -22

No files matched your search

+3 -3
View File
@@ -1,6 +1,6 @@
import sqlite3
from EDMCLogging import get_main_logger
import config
from typing import Union
logger = get_main_logger()
@@ -14,7 +14,7 @@ class Cache:
return
try:
self.db: sqlite3.Connection = sqlite3.connect('squads_stat_cache.sqlite3', check_same_thread=False)
self.db: sqlite3.Connection = sqlite3.connect(config.model_cache_db_path, check_same_thread=False)
except Exception as e:
logger.warning('Cannot create cache DB due to', exc_info=e)
@@ -66,4 +66,4 @@ class Cache:
self.db.execute('delete from cache;')
cache = Cache(True)
cache = Cache(disabled=config.cache_disabled)