settings_local.py.template 2.01 KB
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': 'zhengxing_dev2',
        '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://127.0.0.1:6379/0'
CELERY_BROKER_URL = 'redis://127.0.0.1:6379/0'
CELERY_TASK_SERIALIZER = "json"
SENTRY_CELERY_ENDPOINT = ''

BACKEND_API_HOST = 'http://backend.dev.gmei.com'

# 初始化数据
INIT_DATA = True

# qa hack num
ANSWER_HACK_STRT = '-'

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

MULTI_TOPIC_TAG_ID = 5089

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


TEST_RUNNER = 'gm_test.runner.GmTestRunner'

REDIS = {
    'default': {'host': '127.0.0.1', 'port': 6379, 'db': 0},
    'view': {'host': '127.0.0.1', 'port': 6379, 'db': 1},
    'answer_sort_cache': {'host': '127.0.0.1', 'port': 6379, 'db': 4},
    'high_quality_question_cache': {'host': '127.0.0.1', 'port': 6379, 'db': 5},
    'vote_cache': {'host': '127.0.0.1', 'port': 6379, 'db': 6},
    'page_cache': {'host': '127.0.0.1', 'port': 6379, 'db': 10},
    'social_cache': {'host': '127.0.0.1', 'port': 6379, 'db': 11},
}

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

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