pumpwood_communication.config
Module to set enviroment variables configuration.
1"""Module to set enviroment variables configuration.""" 2import os 3 4 5PUMPWOOD_COMUNICATION__N_PARALLEL = int(os.getenv( 6 "PUMPWOOD_COMUNICATION__N_PARALLEL", 4)) 7"""Number of parallel requests that will be performed on parallel functions.""" 8 9 10# Cache associated cofig variables 11AUTHORIZATION_CACHE_TIMEOUT = int( 12 os.getenv('PUMPWOOD_COMUNICATION__AUTHORIZATION_CACHE_TIMEOUT', 60)) 13"""Config variable to ser cache associated with autorization and row 14 permission cache.""" 15CACHE_BASE_PATH = \ 16 os.getenv('PUMPWOOD_COMUNICATION__CACHE_BASE_PATH', '') 17"""Base path for cache files.""" 18CACHE_LIMIT_MB = int(os.getenv( 19 'PUMPWOOD_COMUNICATION__CACHE_LIMIT_MB', 250)) * 1e8 20"""Limit for disckcache size.""" 21CACHE_DEFAULT_EXPIRE = int(os.getenv( 22 'PUMPWOOD_COMUNICATION__CACHE_DEFAULT_EXPIRE', 60)) 23"""Default expire time for cache.""" 24CACHE_TRANSACTION_TIMEOUT = float(os.getenv( 25 'PUMPWOOD_COMUNICATION__CACHE_TRANSACTION_TIMEOUT', 0.1)) 26"""Default transaction timeout.""" 27CACHE_N_SHARDS = int(os.getenv( 28 'PUMPWOOD_COMUNICATION__CACHE_N_SHARDS', 8)) 29"""Number of shards that will be used to split the cache.""" 30CACHE_ENABLE = os.getenv( 31 'PUMPWOOD_COMUNICATION__CACHE_ENABLE', "TRUE") == "TRUE" 32"""Number of shards that will be used to split the cache.""" 33 34# Parallel operations associated env. variables 35N_PARALLEL = n_parallel = int(os.getenv( 36 "PUMPWOOD_COMUNICATION__N_PARALLEL", 4)) 37"""N parallel calls that will be done on parallel calls.""" 38 39PARALLEL_CHUNK_SIZE = n_parallel = int(os.getenv( 40 "PUMPWOOD_COMUNICATION__PARALLEL_CHUNK_SIZE", 10000)) 41"""Size of each chuck that will be posted in parallel at parallel bulk save."""
PUMPWOOD_COMUNICATION__N_PARALLEL =
4
Number of parallel requests that will be performed on parallel functions.
AUTHORIZATION_CACHE_TIMEOUT =
60
Config variable to ser cache associated with autorization and row permission cache.
CACHE_BASE_PATH =
''
Base path for cache files.
CACHE_LIMIT_MB =
25000000000.0
Limit for disckcache size.
CACHE_DEFAULT_EXPIRE =
60
Default expire time for cache.
CACHE_TRANSACTION_TIMEOUT =
0.1
Default transaction timeout.
CACHE_N_SHARDS =
8
Number of shards that will be used to split the cache.
CACHE_ENABLE =
True
Number of shards that will be used to split the cache.