diff options
Diffstat (limited to 'check/app/settings/app_cfg.py')
| -rw-r--r-- | check/app/settings/app_cfg.py | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/check/app/settings/app_cfg.py b/check/app/settings/app_cfg.py index 904e0d4..ce5b5d8 100644 --- a/check/app/settings/app_cfg.py +++ b/check/app/settings/app_cfg.py @@ -14,7 +14,7 @@ codecs.register(lambda name: codecs.lookup('utf8') if name == 'utf8mb4' else Non # ----------------------------------------------------------------------------- # click settings # ----------------------------------------------------------------------------- -DIR_COMMANDS_CHECK = 'commands/check' +DIR_COMMANDS_PHASH = 'commands/phash' # ----------------------------------------------------------------------------- # S3 storage @@ -29,3 +29,46 @@ S3_HTTP_METADATA_URL = join(S3_HTTP_URL, 'metadata') # ----------------------------------------------------------------------------- CELERY_BROKER_URL = 'redis://localhost:6379/0' CELERY_RESULT_BACKEND = 'redis://localhost:6379/0' + +# ----------------------------------------------------------------------------- +# Logging options exposed for custom click Params +# ----------------------------------------------------------------------------- +LOGGER_NAME = 'app' +LOGLEVELS = { + types.LogLevel.DEBUG: logging.DEBUG, + types.LogLevel.INFO: logging.INFO, + types.LogLevel.WARN: logging.WARN, + types.LogLevel.ERROR: logging.ERROR, + types.LogLevel.CRITICAL: logging.CRITICAL +} +LOGLEVEL_OPT_DEFAULT = types.LogLevel.DEBUG.name +#LOGFILE_FORMAT = "%(asctime)s: %(levelname)s: %(message)s" +#LOGFILE_FORMAT = "%(levelname)s:%(name)s: %(message)s" +#LOGFILE_FORMAT = "%(levelname)s: %(message)s" +#LOGFILE_FORMAT = "%(filename)s:%(lineno)s %(funcName)s() %(message)s" +# colored logs +""" +black, red, green, yellow, blue, purple, cyan and white. +{color}, fg_{color}, bg_{color}: Foreground and background colors. +bold, bold_{color}, fg_bold_{color}, bg_bold_{color}: Bold/bright colors. +reset: Clear all formatting (both foreground and background colors). +""" +LOGFILE_FORMAT = "%(log_color)s%(levelname)-8s%(reset)s %(cyan)s%(filename)s:%(lineno)s:%(bold_cyan)s%(funcName)s() %(reset)s%(message)s" + +LogLevelVar = click_utils.ParamVar(types.LogLevel) + +# ----------------------------------------------------------------------------- +# Filesystem settings +# hash trees enforce a maximum number of directories per directory +# ----------------------------------------------------------------------------- +ZERO_PADDING = 6 # padding for enumerated image filenames +#FRAME_NAME_ZERO_PADDING = 6 # is this active?? +CKPT_ZERO_PADDING = 9 +HASH_TREE_DEPTH = 3 +HASH_BRANCH_SIZE = 3 + +# ----------------------------------------------------------------------------- +# .env config for keys +# ----------------------------------------------------------------------------- +# DIR_DOTENV = join(DIR_APP, '.env') +load_dotenv() # dotenv_path=DIR_DOTENV) |
