Source code for configs.config
"""Module for parsing config file
Module set values in global variables.
"""
import os
from enum import Enum
# How big a request may be (bytes), 100GB
REQUEST_MAX_SIZE = 2 ** (10 + 10 + 10 + 7)
# luna-image-store default port
LIS_PORT = 5020
#: Object lifetime options, in days
[docs]
class ObjectLifetimeSupported(Enum):
"""
Object lifetime supported enum.
"""
NOTSET = None
FOREVER = "-1"
ONE_DAY = "1"
TWO_DAYS = "2"
THREE_DAYS = "3"
FOUR_DAYS = "4"
FIVE_DAYS = "5"
SIX_DAYS = "6"
ONE_WEEK = "7"
TWO_WEEKS = "14"
ONE_MONTH = "30"
TWO_MONTHS = "60"
THREE_MONTHS = "90"
SIX_MONTHS = "180"
ONE_YEAR = "365"
#: Local storage bucket info cache ttl, in seconds
LOCAL_BUCKET_CACHE_TTL = os.environ.get("LOCAL_BUCKET_CACHE_TTL", 60)
# sub directories names limit as decimal number
SUBDIR_NAME_LIMIT = 65535 # from 0 to ffff
# TTL cleanup concurrency
CLEANUP_CONCURRENCY = 10