# coding=utf-8
from dymas.base import *
from .log_settings import *
from celery import *

from celery.schedules import crontab
import pyssdb

CELERY_BROKER_URL = 'redis://:123456@127.0.0.1:6379/0'
REDIS_URL = 'redis://redis.paas-week.env:6379/2'
REDIS_URL2 = 'redis://redis.paas-week.env:6379/2'
ES_V2_HOSTS = [
    {'host': '127.0.0.1', 'port': 9200}
]
ES_SERVICE_HOSTS = [
    {'host': '127.0.0.1', 'port': 9200}
]

# ES_V2_HOSTS = [
#     {'host': 'es.paas-test.env', 'port': 80}
# ]
# ES_SERVICE_HOSTS =[
#     {'host': 'es.paas-test.env', 'port': 9200}
# ]


ES_INDEX_PREFIX = 'gm_test'
COUNT_LIMIT = 100
REDIS = {
    'doctor': {'host': 'localhost', 'port': 6379, 'db': 1},
}

RAVEN_CONFIG = {
    'dsn': 'http://29e77782db3c4429857cb1b6d69d9463:d55eafe28ae64f6e8c4a82fa3bc50fdd@sentry.gengmei.cc/80',
}

CELERYBEAT_SCHEDULE = {
    'doris_ trans2es': {
        'task': 'rank.tasks.doctor_statdata_2_cache',
        # 'schedule': timedelta(seconds=1),
        'schedule': crontab(hour=2, minute=0),
    },
    'doris_cal_device_interest': {
        'task': 'recommend.tasks.cal_userinterest_rank',
        # 'schedule': timedelta(seconds=1),
        'schedule': crontab(hour=2, minute=0),
    },
    'doris_cal_servicehot_rank': {
        'task': 'recommend.tasks.cal_servicehot_rank',
        # 'schedule': timedelta(seconds=1),
        'schedule': crontab(hour=2, minute=0),
    }
}

GM_KV_HOSTS = [
    {

        "host": "redis.paas-week.env.168.15.11",
        "port": 6379,
        "db": 2,
        "password": ""
    },
    {
        "host": "redis.paas-week.env.168.15.12",
        "port": 6379,
        "db": 2,
        "password": ""
    }
]

# http://elasticsearch.paas-week.env/_plugin/head/
