Commit 0a483638 authored by dmitry.mashoshin's avatar dmitry.mashoshin
Browse files

Merge branch 'fix/update-env-var-parsing' into 'master'

fix: update CACHE_ENABLED env variable parsing to booleans

See merge request !185
parents 61e76da6 807581d3
......@@ -17,6 +17,7 @@ from mongodb_mirror import utils, client
from prozorro_sale import metrics
from prozorro_sale.tools import logger
from prozorro_sale.tools.middlewares import request_id_middleware
from prozorro_sale.tools.environment import booleans
from mongodb_mirror.utils import MongoOperation
from mongodb_mirror.errors import ClientTimestampException, IncorrectTimestamp, CriticalError, MirrorClosed
from diskcache import Cache
......@@ -41,7 +42,7 @@ CLIENT_PROTOCOL = {
}
# TODO: refactor env variables to Env class
CACHE_ENABLED = bool(os.environ.get('CACHE_ENABLED', False))
CACHE_ENABLED = booleans(os.environ.get('CACHE_ENABLED', 'false'))
CACHE_FILE_PATH = os.environ.get('CACHE_FILE_PATH', 'serialize_cache')
CACHE_FILE = None
CACHE_SIZE_LIMIT = 1024 ** 2 * 100 # 100 Mb
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment