DATABASES = {
    'default': {  # mysql
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'mimas_test',
        'USER': 'work',
        'PASSWORD': 'workwork',
        # 'HOST': '127.0.0.1',
        'HOST': 'rdsmaqevmuzj6jy.mysql.rds.aliyuncs.com',
        'PORT': '3306',
        'OPTIONS': {
            "init_command": "SET foreign_key_checks = 0;",
            "charset": "utf8mb4",
        },
    },
    'slave': {  # mysql
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'mimas_dev',
        'USER': 'work',
        'PASSWORD': 'workwork',
        # 'HOST': '127.0.0.1',
        'HOST': 'rdsmaqevmuzj6jy.mysql.rds.aliyuncs.com',
        'PORT': '3306',
        'OPTIONS': {
            "init_command": "SET foreign_key_checks = 0;",
            "charset": "utf8mb4",
        },
    },
}

CELERY_TIMEZONE = 'Asia/Shanghai'
BROKER_URL = 'redis://redis-service:6379/2'
CELERY_BROKER_URL = 'redis://redis-service:6379/2'
CELERY_TASK_SERIALIZER = "json"
SENTRY_CELERY_ENDPOINT = ''

BACKEND_API_HOST = 'http://backend.test.env'
DBMW_LOGICAL_DATABASE_ID = 'zhengxing_test'

# 初始化数据
INIT_DATA = False

# qa hack num
ANSWER_HACK_STRT = '-'

QINIU_CDN_HOST = u'http://pic.igengmei.com/'

MULTI_TOPIC_TAG_ID = 5089

GM_SERIALIZER = {
    'redis': {
        'host': 'redis-service', 'port': 6379, 'db': 1
    }
}


TEST_RUNNER = 'gm_test.runner.GmTestRunner'

REDIS = {
    'default': {'host': 'redis-service', 'port': 6379, 'db': 0},
    'view': {'host': 'redis-service', 'port': 6379, 'db': 1},
    'answer_sort_cache': {'host': 'redis-service', 'port': 6379, 'db': 4},
    'high_quality_question_cache': {'host': 'redis-service', 'port': 6379, 'db': 5},
#    'vote_cache': {'host': 'redis-service', 'port': 6379, 'db': 6},
    'vote_cache': {'host': 'redis-service', 'port': 6379, 'db': 11},  # gaia settings.REDIS['vote_cache']
    'page_cache': {'host': 'redis-service', 'port': 6379, 'db': 10},
    'social_cache': {'host': 'redis-service', 'port': 6379, 'db': 11},
    'user_cache': {'host': 'redis-service', 'port': 6379, 'db': 5},
}

DATABASE_ROUTERS = ['utils.router.ThreadLocalRouter',]

LIVE_REDIS = {'host': 'redis-service', 'port': 6379, 'db': 7}
DEFAULT_REDIS = {'host': 'redis-service', 'port': 6379, 'db': 8}
TALOS_RPC_CACHE = {'host': 'redis-service', 'port': 6379, 'db': 9}





LIVE_REDIS = {'host': 'redis-service', 'port': 6379, 'db': 4}
DEFAULT_REDIS = {'host': 'redis-service', 'port': 6379, 'db': 14}

TALOS_RPC_CACHE = {'host': 'redis-service', 'port': 6379, 'db': 14}
QINIU_ACCESS_KEY = "UPCOYIJkZOMcdd9FDzpBqYjzWUh55fBpVi3AhWpL"
QINIU_SECRET_KEY = "z5YvpDDSam_JE345Z8J_f3TufzelOW2VOGNoBl9e"

QINIU_LIVE_DOMAIN = u'pili-publish.live-test.igengmei.com'
QINIU_HUB_NAME = u'igengmei-live-test'
QINIU_LIVE_TIMEOUT = 3600
QINIU_REPLAY_LIVE_DOMAIN = u'http://live-static-test.igengmei.com/'
QINIU_TEMP_CDN_HOST = u'http://pic-tmp.igengmei.com/'
BUILD_SITEMAP_COUNT = 1000
SEND_MSG_TIME = 10
MSG_POLL_TIME = 4
LIVE_TIME_OUT = 15 * 60
ENTER_MSG_TIME = 2 * 60
LIVE_MSG_REDIS_FLAG = False
MIMAS_LOGICAL_DATABASE_ID='mimas_test'
from gm_types.gaia import USER_RIGHTS_LEVEL
CAN_CREATE_VIDEO_LEVEL = USER_RIGHTS_LEVEL.V3
SHOW_VIDEO_COVER = True
DAYS_BEFORE_TODAY = -1
HOT_DISCUSSION_TAG_DIARY_SHRESHOLD = 1000
HOT_DISCUSSION_TAG_CONSULT_SHRESHOLD = 30
HOT_DISCUSSION_TAG_DISCUSS_SHRESHOLD = 100
REDIS_MIGRATE_TALOS = (
    {
        # gaia REDIS view addr.
        'source': {'host': 'redis-service', 'port': 6379, 'db': 2},
        'prefix': ('diary_pv',),
        'target': REDIS['view']
    },
)