config.py 676 Bytes
import os  # Add for environment variable reading


ES_CONFIG = {
    'host': 'http://localhost:9200',
    # default index name will be overwritten below based on APP_ENV
    'index_name': 'spu',
    'username': 'essa',
    'password': '4hOaLaf41y2VuI8y'
}


# Redis Cache Configuration
REDIS_CONFIG = {
    # 'host': '120.76.41.98',
    'host': 'localhost',
    'port': 6479,
    'snapshot_db': 0,
    'password': 'BMfv5aI31kgHWtlx',
    'socket_timeout': 1,
    'socket_connect_timeout': 1,
    'retry_on_timeout': False,
    'cache_expire_days': 180,  # 6 months
    'translation_cache_expire_days': 360,
    'translation_cache_prefix': 'trans'
}