#coding:utf8
import pyssdb
import os
import raven


DEBUG = False
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',  # 设置为mysql数据库
        'NAME': 'bran_test',
        'USER': 'work',
        'PASSWORD': 'Gengmei1',
        'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
        'PORT': '3306',
        'OPTIONS': {
            "init_command": "SET foreign_key_checks = 0;",
            "charset": "utf8mb4",  # 为了支持emoji表情
        },
    },
    'gaia':{
        'ENGINE': 'django.db.backends.mysql',  # 设置为mysql数据库
        'NAME': 'zhengxing_test',
        'USER': 'work',
        'PASSWORD': 'Gengmei1',
        'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
        'PORT': '3306',
        'OPTIONS': {
            "init_command": "SET foreign_key_checks = 0;",
            "charset": "utf8mb4",  # 为了支持emoji表情
        },
    },
}

CELERY_BROKER_URL = 'redis://192.168.168.142/0'

REDIS_URL = 'redis://192.168.168.142/2'


REDIS = {
    'default': {'host': '192.168.168.142', 'port': 6379, 'db': 0,}
}



PUSH_EVENT_LIMIT = {'sum': 5, 'service': 1}

TIME_FRAGMENT = {'5h': '5h', '1d': '1d', '5d': '5d', '7d': '7d'}
ACTION_TRIGGER_INTERVAL = 5  # 事件触发时间间隔 hours

DAILY_EVENT_HANDLE_TIME = [9, 13, 21]

SSDB_CLIENT = pyssdb.Client(host='127.0.0.1', port=8888)




RAVEN_CONFIG = {
    'dsn': 'http://9f8992868f0348efaca2f4375e8db1df:11764cbbdb1440c38142c9e1a1e663ac@sentry.igengmei.com/131',
}
