Commit 8704c044 authored by 胡凯旋's avatar 胡凯旋

use settings_local from my mac

parent 52b14689
......@@ -85,8 +85,11 @@ docker build --no-cache -t 项目名:local.latest .
cp ./settings_local/backend/settings_local.py /srv/apps/backend/gengmei
cp ./settings_local/gaia/settings_local.py /srv/apps/gaia/gaia
cp ./settings_local/mimas/settings_local.py /srv/apps/mimas/settings/settings_local.py
cp ./settings_local/mimas/deploy_prod.xml /srv/apps/mimas/
cp ./settings_local/doris/devel.py /srv/apps/doris/doris/devel.py
cp ./settings_local/doris/deploy_prod.xml /srv/apps/doris/deploy_prod.xml
```
6. docker-for-mac上添加File Sharing配置 /srv/apps、/data/log,添加后点击Apply & Restart,若报错如下,可不必添加。
![](image/2018-10-25-13-30-29.png)
......
# coding=utf-8
# test by wph
import datetime
from datetime import timedelta
......@@ -16,7 +15,7 @@ IOS_UPDATE = True
ANDROID_UPDATE = True
RAVEN_CONFIG = {
'dsn': ''
'dsn': 'http://97c46f2222a742a99271c70d2b9ccc67:90261dbdb8d0440d921977cd71fe170a@sentry.wanmeizhensuo.com/5',
}
DEBUG = True
......@@ -28,7 +27,7 @@ STATICFILES_DIRS = (
)
ENCRYPT_KEY = 'Up[K+ub%pliOnsO5UavFBd)cw5VcyHSX'
BODYPART_ALL_ICON = 'http://hera.s.gmei.com/bodypart/2016/05/25/c95f1dd609'
SERVICE_SPECIAL_DES_ICON = 'http://hera.s.gmei.com/2017/07/10/9950841785'
SERVICE_SPECIAL_DES_ICON = 'http://hera.s.igengmei.com/2017/07/10/9950841785'
HIDE_TAGS = False
EVENT_DOCTOR_TITLES = [
('2015-08-05', u'自体脂肪'),
......@@ -52,7 +51,9 @@ RPC_URL = 'http://rpc.test.gengmei.cc/api/'
RPC_SECRET = 'basic:M21gQkp0vWmDxlB5wVsIGCgbjdcshCsYaTgl4Rq0E6ug6Ma2teM9tpGCf5TZHsCGGC4cGQ4as9N3KmrDPQ43gA=='
# RPC_INVOKER = helios.rpc.RPCFactory(RPC_URL, RPC_SECRET, debug=DEBUG, debug_unwrap_checker_raise_exception=False, debug_dump_curl=True, use_batch=False).create_invoker()
RPC_INVOKER = helios.rpc.create_default_invoker(debug=DEBUG)
#RPC_INVOKER = helios.rpc.create_default_invoker(
# debug=DEBUG, request_timeout_times=3.0, timeout=47.9
#).with_config(dump_curl=True)
# ====================================================================================================
# ============================================分期付款=================================================
......@@ -75,6 +76,17 @@ PCWEB_API_HOST = "http://pcweb.test.gmei.com"
OPBACK_URL = "http://admin.test.gmei.com"
QINIU_HOST = "http://wanmeizhensuo.qiniudn.com"
# ====================================================================================================
# ============================================ 微 信 =================================================
# ====================================================================================================
WECHAT_APP_ID = "wx403cd28c142c7d87"
WECHAT_PARTNER_ID = "1302548401"
WECHAT_SECRET = "e821f46be6ee45e3ca80d189f989313b"
WECHAT_NOTIFY_URL = "http://backend.test.gmei.com/pay/wechat/notify"
WECHAT_KEY = "/srv/secret/apiclient_key.pem"
WECHAT_CERT = "/srv/secret/apiclient_cert.pem"
# ====================================================================================================
# ============================================邮件发送=================================================
# ====================================================================================================
......@@ -98,8 +110,8 @@ ALIPAY_SIGN_TYPE = 'MD5'
# ====================================================================================================
# ============================================Redis===================================================
# ====================================================================================================
REDIS = {'host': '192.168.168.142', 'port': 6379, 'db': 0}
BROKER_URL = 'redis://192.168.168.142:6379/3'
REDIS = {'host': 'test-redis', 'port': 6379, 'db': 0}
BROKER_URL = 'redis://test-redis:6379/3'
BROKER_TRANSPORT_OPTIONS = {'visibility_timeout': 259200} # 72 hours
CELERY_TIMEZONE = 'Asia/Shanghai'
CELERYBEAT_SCHEDULE = {
......@@ -301,8 +313,9 @@ GENGMEI_KEFU_PERSON_ID = '2b64c68727cb11e68181f45c899f3b33'
FEEDBACK_CS_GROUP = '455979578157409fab1ca83f4f824e87'
#SESSION_COOKIE_DOMAIN_GENGMEI = 'backend.test.gengmei.cc'
SESSION_COOKIE_DOMAIN_BACKEND_GENGMEI = 'backend.test.gengmei.cc'
SESSION_COOKIE_DOMAIN_BACKEND_GENGMEI = 'backend.test.env'
SESSION_COOKIE_DOMAIN_IGENGMEI = '.test.env'
SESSION_COOKIE_DOMAIN = '.test.env' # since 6.0
PUSH_NOTIFICATION_AFTER_FOLLOW_USER = True
ORDER_COMPLETE_SHARE_COUPONGIFT_ID = 40
......@@ -317,6 +330,7 @@ PAY_TOGGLE = {
'zhongan': True,
'yirendai': True,
'renmai_credit': True,
'huabei': True,
}
PROMOTE_AREA_SERVICE = []
......@@ -407,12 +421,52 @@ INDEX_TAB_CONFIG = [
# 2017.5 分享文案开关
NEW_SHARE_DATA = True
POINT_MALL_SWITCH = True
SESSION_COOKIE_DOMAIN_IGENGMEI = '.test.env'
SESSION_COOKIE_DOMAIN = '.test.env' # since 6.0
FACE_REPORT_WITH_UINFO_V1 = ['9', '3','8','6','7'] # 新版发布概率,add in 7630
FACE_REPORT_WITH_UINFO = ['7','3','2','6']
SERVICE_DETAIL_IN_TEST = False # 全量测试开关
# 美购详情页ios灰度,
SERVICE_DETAIL_GRAY_IOS = ["0", "1", "2", "3", "5", "6", "8", "9", "A", "B", "C", "D", "E", "F"]
INNER_SERVICE_DETAIL_LIST = ['864325039478033','866920039414794','864370038130912'] # 新版美购详情页,增加测试灰度
GWL = [
# 交易组
"F3388187-75F7-4831-AA0C-1886FD332731",
"6A99CBB1-6738-4ED1-A042-199CA80AAB22",
"EB5AB253-6D49-4B01-943D-B9278C9F674A",
"9C2A7797-16D3-4A9C-B19C-41A9AC186E61",
# 社交组
"C504140B-FACE-453D-A61C-1A056CF47A40",
"98AAC4A9-8F69-4EBE-B8C2-39F47023DE1D",
"AE024593-B832-4B23-BA16-DCB2B403D269",
"4841C5E0-DCE8-4108-9432-9E46631AACA3",
"826D4695-5D3F-40FC-8DF3-800F03CA32FB",
"B42685C0-702F-4C54-8C9E-73AEC5F3AAEC",
"30A24968-E6E0-429F-8BC4-91054C01F0F0",
"19F592FE-A442-4372-A2AA-D873A8A870E9",
"E362248A-0AA7-4ED0-856C-CBFDE0524F88",
# 产品组
"B268AC13-8FEA-4E1A-97FD-AEF7D13CEBC8",
"03E3692A-DD9A-443C-9481-6E882EF5DEA4",
"EB8B8B98-F865-494D-8D87-C323714A6F53",
"C608EDA4-B305-4E1B-ABBD-6DDAD4EDAAF3",
"00CA20EB-2719-4518-85CC-60E765AC526F",
"androidid_4f7e1e999d5a0ad7",
"CDD0756B-2DBA-43FB-93A4-8EC32A76A7CE",
"CE5C0FF8-C830-4184-BEF6-A2F67BF9EFAA",
"E1A4F2BF-8D0A-4465-8A3E-B8F562A38E2B",
"865846039243795",
"62B3D99D-F4A2-4104-BBB1-2B803F8A6943",
"3DB03D3C-A85E-4601-A8DE-CD1757D03048",
]
IS_QA_RICHTEXT = True
# 订单尾款花呗分期开关
HOSPITAL_PAY_HUABEI_SWITCH = True
WECHAT_SMALL_APPID = 'wx113018c998de9eaf'
WECHAT_SMALL_APPSECRET = '328083f0cbb131c7de3b3920eed8ddaf'
TRACE_SAMPLE_RATE = 100.0
# TRACE_FILTER_API_OK = False
# TRACE_URLPATTERN_AS_SPAN_NAME = False
DATADOG_TRACE = {
'DEFAULT_SERVICE': 'backend',
'TAGS': {'env': 'production'},
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<gm_rpcd_config>
<info config_name="deploy" version="1.0"/>
<config name="log_dir" value="/data/log/doris/app"/>
<config name="sentry_dsn" value=""/>
</gm_rpcd_config>
......@@ -7,19 +7,19 @@ from celery.schedules import crontab
import pyssdb
CELERY_BROKER_URL = 'redis://192.168.168.142/0'
REDIS_URL = 'redis://192.168.168.142/1'
CELERY_BROKER_URL = 'redis://:123456@127.0.0.1:6379/0'
REDIS_URL = 'redis://127.0.0.1:6379/1'
ES_V2_HOSTS = [
{'host': '192.168.168.142', 'port': 9200},
{'host': '10.30.57.94', 'port': 9200},
]
ES_INDEX_PREFIX = 'gm_test'
COUNT_LIMIT = 50
COUNT_LIMIT = 100
REDIS = {
'doctor': {'host': '192.168.168.142', 'port': 6379, 'db': 1,},
'doctor': {'host': 'localhost', 'port': 6379, 'db': 1},
}
......@@ -48,4 +48,22 @@ CELERYBEAT_SCHEDULE = {
SSDB_CLIENT = pyssdb.Client(host='192.168.168.143', port=8888)
SSDB_CLIENT = pyssdb.Client(host='10.173.24.179', port=8888)
GM_KV_HOSTS = [
{
"host":"10.66.187.105",
"port":5379,
"db":2
},
{
"host":"10.66.187.97",
"port":5379,
"db":2
},
{
"host":"10.66.187.100",
"port":5379,
"db":2
}
]
......@@ -19,7 +19,7 @@ ALLOWED_HOSEPT_BLACK_LIST = [
'00000000-0000-0000-0000-000000000000',
]
LIVE_REDIS = {'host': '192.168.168.142', 'port': 6379, 'db': 4}
LIVE_REDIS = {'host': '127.0.0.1', 'port': 6379, 'db': 4}
SECRET_KEY = 'fl-lv3j^czg(dupo@hbs(+_+djby9zelwt&rh71@b1x*ptmj4#(^' #dev
DEBUG = True
......@@ -35,10 +35,10 @@ GAME_WISHTREE_COUPON_ID = 1196
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库
'NAME': 'zhengxing_test', # zhengxing_test test-zhengxing_for_ascle2
'NAME': 'zhengxing_test',
'USER': 'work',
'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PASSWORD': 'workwork',
'HOST': 'rdsmaqevmuzj6jy.mysql.rds.aliyuncs.com',
'PORT': '',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
......@@ -47,11 +47,11 @@ DATABASES = {
},
'slave':{
'ENGINE': 'django.db.backends.mysql',
'NAME': 'zhengxing_test', # zhengxing_test
'NAME': 'zhengxing_test',
'USER': 'work',
'PASSWORD': 'Gengmei1',
'PASSWORD': 'workwork',
#'HOST': '127.0.0.1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'HOST': 'rdsmaqevmuzj6jy.mysql.rds.aliyuncs.com',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
......@@ -62,8 +62,8 @@ DATABASES = {
'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库
'NAME': 'hera_test',
'USER': 'work',
'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PASSWORD': 'workwork',
'HOST': 'rdsmaqevmuzj6jy.mysql.rds.aliyuncs.com',
'PORT': '',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
......@@ -74,8 +74,8 @@ DATABASES = {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'verita_test',
'USER': 'work',
'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PASSWORD': 'workwork',
'HOST': 'rdsmaqevmuzj6jy.mysql.rds.aliyuncs.com',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
......@@ -86,8 +86,8 @@ DATABASES = {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'mimas_test',
'USER': 'work',
'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PASSWORD': 'workwork',
'HOST': 'rdsmaqevmuzj6jy.mysql.rds.aliyuncs.com',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
......@@ -98,20 +98,32 @@ DATABASES = {
'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库
'NAME': 'bran_test',
'USER': 'work',
'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PASSWORD': 'workwork',
'HOST': 'rdsmaqevmuzj6jy.mysql.rds.aliyuncs.com',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", # 为了支持emoji表情
},
},
'tidb': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'eagle',
'USER': 'root',
'PASSWORD': '',
'HOST': '192.168.15.12',
'PORT': '4000',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4",
},
},
'message': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'whisper_test',
'USER': 'work',
'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PASSWORD': 'workwork',
'HOST': 'rdsmaqevmuzj6jy.mysql.rds.aliyuncs.com',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
......@@ -144,27 +156,25 @@ GAIA_AUTHENTICATION = {
# ====================================================================================================
# ============================================REDIS===================================================
# ====================================================================================================
# BROKER_URL = 'redis://test-redis:6379/13'
BROKER_URL = 'redis://192.168.168.142/13'
BROKER_URL = 'redis://test-redis:6379/13'
BROKER_TRANSPORT_OPTIONS = {'visibility_timeout': 60 * 60 * 24 * 3} # 3days. Make sure that colleagues have knew that
REDIS = {
'doctor': {'host': '192.168.168.142', 'port': 6379, 'db': 0},
'hospital': {'host': '192.168.168.142', 'port': 6379, 'db': 1},
'view': {'host': '192.168.168.142', 'port': 6379, 'db': 2},
'user_cache': {'host': '192.168.168.142', 'port': 6379, 'db': 5},
'conversation_cache': {'host': '192.168.168.142', 'port': 6379, 'db': 6},
'tag_cache': {'host': '192.168.168.142', 'port': 6379, 'db': 12},
'diary': {'host': '192.168.168.142', 'port': 6379, 'db': 4},
'page_cache': {'host': '192.168.168.142', 'port': 6379, 'db': 15},
'coupon_gift': {'host': '192.168.168.142', 'port': 6379, 'db': 10},
'social_cache': {'host': '192.168.168.142', 'port': 6379, 'db': 11},
'vote_cache': {'host': '192.168.168.142', 'port': 6379, 'db': 11},
'wechat': {'host': '192.168.168.142', 'port': 6379, 'db': 11},
'game': {'host': '192.168.168.142', 'port': 6379, 'db': 4},
'resys_cache': {'host': '192.168.168.142', 'port': 6379, 'db': 3},
'doctor': {'host': 'test-redis', 'port': 6379, 'db': 0},
'hospital': {'host': 'test-redis', 'port': 6379, 'db': 1},
'view': {'host': 'test-redis', 'port': 6379, 'db': 2},
#'user_cache': {'host': 'test-redis', 'port': 6379, 'db': 5},
'conversation_cache': {'host': 'test-redis', 'port': 6379, 'db': 6},
'tag_cache': {'host': 'test-redis', 'port': 6379, 'db': 12},
'diary': {'host': 'test-redis', 'port': 6379, 'db': 4},
'page_cache': {'host': 'test-redis', 'port': 6379, 'db': 15},
'coupon_gift': {'host': 'test-redis', 'port': 6379, 'db': 10},
'social_cache': {'host': 'test-redis', 'port': 6379, 'db': 11},
'vote_cache': {'host': 'test-redis', 'port': 6379, 'db': 11},
'wechat': {'host': 'test-redis', 'port': 6379, 'db': 11},
'game': {'host': 'test-redis', 'port': 6379, 'db': 4},
'resys_cache': {'host': 'test-redis', 'port': 6379, 'db': 3},
}
# DEFAULT_REDIS = {'host': 'test-redis', 'port': 6379, 'db': 14}
DEFAULT_REDIS = {'host': '192.168.168.142', 'port': 6379, 'db': 14}
DEFAULT_REDIS = {'host': 'test-redis', 'port': 6379, 'db': 14}
# ====================================================================================================
......@@ -185,12 +195,16 @@ IPHONE_USE_SANDBOX = True
# ====================================================================================================
# ============================================ES======================================================
# ====================================================================================================
ES_HOSTS = [{'host': '192.168.168.142', 'port': 9200}]
ES_HOSTS = [{'host': 'dev-es', 'port': 9200}]
ES_V2_HOSTS = [
{'host': '192.168.168.142', 'port': 9200},
{'host': 'es1.dev.gengmei', 'port': 9200},
{'host': 'es2.dev.gengmei', 'port': 9200},
{'host': 'es3.dev.gengmei', 'port': 9200},
]
TALOS_ES_HOSTS = [
{'host': '192.168.168.142', 'port': 9200},
{'host': 'es1.dev.gengmei', 'port': 9200},
{'host': 'es2.dev.gengmei', 'port': 9200},
{'host': 'es3.dev.gengmei', 'port': 9200},
]
ES_INDEX_PREFIX = 'gm_test'
ES_READ_INDEX = 'gm_test_read'
......@@ -210,7 +224,7 @@ ES_MSG = {
'database': [{
'name': 'db1',
'es_version': 'v1',
'hosts': [{'host': '192.168.168.142', 'port': 9200}],
'hosts': [{'host': 'dev-es', 'port': 9200}],
'table': [{
'name': 'conversation',
'index': 'gm_msg_test',
......@@ -224,7 +238,9 @@ ES_MSG = {
'name': 'db2',
'es_version': 'v2',
'hosts': [
{'host': '192.168.168.142', 'port': 9200},
{'host': 'es1.dev.gengmei', 'port': 9200},
{'host': 'es2.dev.gengmei', 'port': 9200},
{'host': 'es3.dev.gengmei', 'port': 9200},
],
'table': [{
'name': 'conversation',
......@@ -239,7 +255,7 @@ ES_MSG = {
'name': 'db3',
'es_version': 'v2',
'hosts': [
{'host': '192.168.168.142', 'port': 9200}
{'host': '10.173.24.179', 'port': 9200}
],
'table': [{
'name': 'conversation',
......@@ -258,7 +274,7 @@ ES_MSG = {
# ==========================================DATA SYNC=================================================
# ====================================================================================================
DATA_SYNC = {
'redis_url': 'redis://192.168.168.142:6379/15',
'redis_url': 'redis://test-redis:6379/15',
'prefix': 'gaia:data-sync',
'enqueue_table_event': True,
'table_event_process_delay_list':[],
......@@ -270,7 +286,7 @@ DATA_SYNC = {
# =========================================ASYNC_QUEUE================================================
# ====================================================================================================
ASYNC_QUEUE = {
'redis_url': 'redis://192.168.168.142:6379/13',
'redis_url': 'redis://test-redis:6379/13',
'redis_prefix': 'test-gaia:async-queue',
'logger_name': 'async_queue_logger',
'check_period_seconds': 1,
......@@ -405,7 +421,7 @@ MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCnxj/9qwVfgoUh/y2W89L6BkRAFljhNhgPdyPuBV64
MAIDAN_VISIBLE=True
# 买单的支付通知URL前缀,请保证最后一个字符是"/"
MAIDAN_PAY_NOTIFY_URL_BASE = "http://backend-service.default/pay/maidan/notify/"
MAIDAN_PAY_NOTIFY_URL_BASE = "http://backend.test.igengmei.com/pay/maidan/notify/"
YINUO_SECRECT = 'kwR58f2BNLWemSmOEDsi9mJReWpHfGo8'
YINUO_USER_ID = 'KOQ6CNWM'
......@@ -835,8 +851,7 @@ LIVE_MSG_REDIS_FLAG = True
QINIU_LIVE_TIMEOUT = 86400
SEND_MSG_TIME = 6
TALOS_RPC_CACHE = {'host': '192.168.168.142', 'port': 6379, 'db': 14}
# TALOS_RPC_CACHE = {'host': 'redis.test.gengmei', 'port': 6379, 'db': 14}
TALOS_RPC_CACHE = {'host': 'test-redis', 'port': 6379, 'db': 14}
DOCTOR_BUSINESS_CHANNAL_ID = 51
......@@ -886,3 +901,5 @@ ASYNC_TRIGGER_RECIEVE=False
SECKILL_NEW_SEPARATED_SERVICE = True
SECKILL_NEW_SEPARATED_HOSPITAL = True
GMTRACER_CAN_PATCH_DB = False
\ No newline at end of file
import uuid
from datetime import timedelta, date
from celery.schedules import crontab
from gm_types.gaia import USER_RIGHTS_LEVEL
DATABASES = {
'default': { # mysql
'ENGINE': 'django.db.backends.mysql',
'NAME': 'mimas_test',
'USER': 'work',
'PASSWORD': 'Gengmei1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4",
},
},
}
CELERY_TIMEZONE = 'Asia/Shanghai'
BROKER_URL = 'redis://192.168.168.142/0'
CELERY_TASK_SERIALIZER = "json"
SENTRY_CELERY_ENDPOINT = ''
BACKEND_API_HOST = 'https://backend.igengmei.com'
# 初始化数据
INIT_DATA = False
REDIS_CONF = {'host': '192.168.168.142', 'port': 6379, 'db': 0, }
# qa hack num
SUOZHANG_UID = 22
ANSWER_HACK_STRT = '-'
QINIU_CDN_HOST = u'http://pic.igengmei.com/'
MULTI_TOPIC_TAG_ID = 5089
GM_SERIALIZER = {
'redis': {
'host': '192.168.168.142', 'port': 6379, 'db': 1,
}
}
TEST_RUNNER = 'gm_test.runner.GmTestRunner'
REDIS = {
'default': {'host': '192.168.168.142', 'port': 6379, 'db': 0, },
'view': {'host': '192.168.168.142', 'port': 6379, 'db': 1, },
'answer_sort_cache': {'host': '192.168.168.142', 'port': 6379, 'db': 4, },
'high_quality_question_cache': {'host': '192.168.168.142', 'port': 6379, 'db': 5, },
'vote_cache': {'host': '192.168.168.142', 'port': 6379, 'db': 6, },
'user_cache': {'host': '192.168.168.142', 'port': 6379, 'db': 5, },
}
DATABASE_ROUTERS = ['utils.router.ThreadLocalRouter']
REDIS_MIGRATE = (
{
# gaia view_cache addr.
'source': {'host': '192.168.168.142', 'port': 7777, 'db': 1, },
'prefix': ('question_view', 'answer_view'),
'target': REDIS['view']
},
{
# gaia answer_sort_cache addr:
'source': {'host': '192.168.168.142', 'port': 7777, 'db': 2, },
'prefix': ('answer_sort_cache',),
'target': REDIS['answer_sort_cache']
},
{
# gaia vote_cache addr.
'source': {'host': '192.168.168.142', 'port': 7777, 'db': 2, },
'prefix': ('vote_cache',),
'target': REDIS['vote_cache']
},
)
# topic 迁移一期,暂时共用gaia redis
REDIS_TOPIC_1ST = {
'default': {'host': '192.168.168.142', 'port': 6379, 'db': 14, }, # gaia settings.DEFAULT_REDIS
'view': {'host': '192.168.168.142', 'port': 6379, 'db': 2, }, # gaia settings.REDIS['view']
'talos_rpc_cache': {'host': '192.168.168.142', 'port': 6379, 'db': 14, }, # gaia settings.TALOS_RPC_CACHE
'user_cache': {'host': '192.168.168.142', 'port': 6379, 'db': 5, }, # gaia settings.REDIS['user_cache']
'page_cache': {'host': '192.168.168.142', 'port': 6379, 'db': 15, }, # gaia settings.REDIS['page_cache']
'vote_cache': {'host': '192.168.168.142', 'port': 6379, 'db': 11, }, # gaia settings.REDIS['vote_cache']
}
REDIS_MIGRATE_TALOS = (
{
# gaia REDIS view addr.
'source': {'host': '192.168.168.142', 'port': 7777, 'db': 1, },
'prefix': ('diary_pv',),
'target': REDIS['view']
},
)
CELERYBEAT_SCHEDULE = {
"build_high_quality_cache": {
'task': 'qa.tasks.answer.build_high_quality_cache',
'schedule': timedelta(seconds=3600),
'args': (),
},
# 轮训七牛转码状态
'check_water_mark_video_is_finish': {
'task': 'live.tasks.check_water_mark_video_is_finish',
'schedule': timedelta(seconds=300),
'args': (),
},
# 生成直播回放帖子
'save_replay_url': {
'task': 'live.tasks.save_replay_url',
'schedule': timedelta(minutes=30),
'args': (),
},
# 直播状态检查
'check_live_status': {
'task': 'live.tasks.check_live_status',
'schedule': timedelta(minutes=2),
'args': (),
},
'add_fake_vote_num_list': {
'task': 'live.tasks.add_fake_vote_num_list',
'schedule': timedelta(minutes=1),
'args': (),
},
# 已无调用 180411
# v 7.6.65 更改 该功能不再使用!
# 'hot_in_24hrs': {
# 'task': 'talos.tasks.topic.hot_in_24hrs',
# 'schedule': crontab(minute=0, hour='9,12,21'),
# 'args': ()
# },
# 统计crash相关关键字帖子
'crash_checkout': {
'task': 'talos.tasks.crash_checkout.crash_check',
'schedule': crontab(hour=3, minute=0),
'args': (),
},
# 他人主页推荐关注的用户
'create_high_quality_user_to_redis': {
'task': 'talos.tasks.diary.create_high_quality_user_to_redis',
'schedule': crontab(hour=3, minute=0),
'args': (),
},
# 提醒用户更新日记
"remind_user_to_update_diary": {
'task': 'talos.tasks.diary.remind_user_to_update_diary',
'schedule': crontab(day_of_month="*", hour="21", minute=0),
'args': ()
},
# 计算帖子热度分数
'calc_topic_ranking': {
'task': 'talos.tasks.topic_ranking.calc_topic_ranking',
'schedule': crontab(hour=4, minute=0), # hour should be exactly the same as TopicRankingScore.SPLIT_HOUR
'args': (),
},
'doctor_diary_tags': {
'task': 'talos.tasks.diary.doctor_diary_tags',
'schedule': crontab(minute=30, hour='6'),
'args': ()
},
# 非日记帖,同步成问答
'convert_topic_to_question': {
'task': 'talos.tasks.topic.move_topic_to_answer',
'schedule': crontab(hour=4, minute=0),
'args': (),
},
'get_index_diary_detail': {
'task': 'talos.tasks.diary.get_index_diary_detail',
'schedule': crontab(hour=3, minute=0),
'args': (),
},
'fake_vote_to_topics': {
'task': 'talos.tasks.topic.fake_vote_to_topic',
'schedule': crontab(minute=0, hour='0,8-23'),
'args': (),
},
# 记录邀请人user_id列表池
'build_inviter_pool': {
'task': "qa.tasks.answer.build_inviter_pool",
'schedule': crontab(hour=1, minute=0),
'args': (),
},
# 每天下午5点,定时推送被邀请回答的用户,累计被邀请的次数。
'time_push_to_invited_user': {
'task': "qa.tasks.answer.time_push_to_invited_user",
'schedule': crontab(hour=17, minute=0),
'args': (),
},
'take_sofa_diary': {
'task': 'talos.tasks.diary.take_sofa_diary',
'schedule': timedelta(minutes=20),
'args': (),
},
'default_diary_rating': {
'task': 'talos.tasks.diary.default_diary_rating',
'schedule': crontab(hour=3, minute=0),
'args': (),
},
'preload_index_diaries': {
'task': 'talos.tasks.period_tasks.preload_index_diaries',
'schedule': timedelta(minutes=30),
'args': (),
},
'mark_reply_spam': {
'task': 'talos.tasks.period_tasks.mark_reply_spam',
'schedule': crontab(minute=50, hour=23),
'args': (),
},
# 抓取微信公众号数据
'get_wechat_pgc': {
'task': 'talos.tasks.topic.get_wechat_pgc',
'schedule': crontab(hour=3, minute=0),
'args': (),
},
'rerun_wechat_pgc': {
'task': 'talos.tasks.topic.rerun_pgc',
'schedule': crontab(hour='*/3', minute=0),
'args': (),
},
'preload_operation_tags': {
'task': 'talos.tasks.period_tasks.preload_tags',
'schedule': timedelta(minutes=60),
'args': (),
},
'hospital_topics_nums': {
'task': 'talos.tasks.diary.hospital_topics_num',
'schedule': crontab(hour=2, minute=10),
'args': (),
},
# 早上五点进行pv同步
'sync_diary_pv': {
'task': 'talos.tasks.diary.update_diary_pv',
'schedule': crontab(minute=0, hour=5),
'args': (),
},
# 每两个小时计算一次推荐问题数据
"get_relation_college_tag_questions": {
"task": "qa.tasks.answer.get_relation_college_tag_questions",
"schedule": timedelta(hours=2),
"args": (),
},
}
ES_INDEX_PREFIX = 'gm_test'
ES_HOSTS = [
{'host': '192.168.168.142', 'port': 9200},
]
LOGICAL_DATABASE_ID = 'mimas_test'
# listing decorator.
COUNT_LIMIT = 100
VERSION = uuid.uuid1()
QUESTION_SCORE_WEIGHT = {
'time_score_weight': 1, #
'answers_num_score_weight': 1,
'answer_views_score_weight': 1,
'answer_likes_score_weight': 1,
'question_view_score_weight': 1,
'question_answer_likes_score_weight': 1,
}
DIARY_HEAT_RANK = {
'lose_rate': 0.006, # 热度分时间衰减比率 0.006/hour/热度分
'max_score': 50, # 最大热度分
'reply_num_per_device': 3, # 每设备评论每天限制三次
# 加分相关
'score_create_topic': 4,
'score_modify_diary': 2,
'score_self_reply': 1,
'score_other_reply': 1,
'score_other_vote': 0.5,
# 限制相关
'restrict_create_topic': 2,
'restrict_modify_diary': 1,
'restrict_self_reply': 10,
'restrict_other_reply': 15,
'restrict_other_vote': 20,
}
SEND_MSG_TIME = 10
MSG_POLL_TIME = 4
LIVE_TIME_OUT = 15 * 60
ENTER_MSG_TIME = 2 * 60
QINIU_TEMP_CDN_HOST = u'http://pic-tmp.igengmei.com/'
LIVE_MSG_REDIS_FLAG = False
# 网易易盾反垃圾
YD_SECRET_ID = '914c9cb763500c23acdf121faed02c31'
YD_SECRET_KEY = 'ffb43924f88946f7d5b7aac1832a18e5'
YD_BUSINESS_ID = '8034f7ed207ec691c3f30d318e06e0c7'
# 特殊推送限制
SPECTAL_SECONDS_LIMIT = 7200
SPECIAL_PUSH_LIMIT = 4
PUSH_SUB_LIMIT = 1 # 子项,每日只能发一次
PERSON_GET_COMMENT_PUSH_LIMIT = 5 # 评论的每日收到的推送次数
LEVEL_UPPER_GAIN_POINTS = 200 # 每升一等级,增加美分200
USER_EVENT_MULTI_TIMES = 6 # 累计操作次数,给予不同的美分、成长值奖励
POINT_DAILY_LIMIT = 400 # 美分每日上限
GROWTH_DAILY_LIMIT = 300 # 成长值每日上限
UNSHOW_TAGS = [u'美购日记', u'所长精选', u'热门讨论']
# 评论图片和字数限制
CASHBACK_TOPIC_IMAGE_LIMIT = 2
CASHBACK_TOPIC_CONTENT_WORDS_LIMIT = 20
ELITE_LIKE_NUM = 5
HOT_TOPIC_VOTE_THRESHOLD = 10
HOT_TOPIC_VOTE_THRESHOLD_IN_ZONE = 10
REPLIES_READ_MYSQL_FLAG = True
NOTIFICATION_REPLY_IMG = 'http://hera.s.igengmei.com/2017/07/28/c32ff57e7a'
NOTIFICATION_VOTE_IMG = 'http://hera.s.igengmei.com/2017/07/28/d7e0c06fb0'
# 检索时间
DAYS_BEFORE_TODAY = -1
# 短视频权限起始等级
CAN_CREATE_VIDEO_LEVEL = USER_RIGHTS_LEVEL.V3
SHOW_VIDEO_COVER = True
HOT_DISCUSSION_TAG_DIARY_SHRESHOLD = 1000
HOT_DISCUSSION_TAG_CONSULT_SHRESHOLD = 30
HOT_DISCUSSION_TAG_DISCUSS_SHRESHOLD = 100
VIDEO_PIC_URL = u'?vframe/jpg/offset/0/rotate/auto'
VIDEO_HOST = u'http://video-static.igengmei.com/'
FOUNDING_DAY = date(2013, 8, 8)
SOCIAL_REPLY_WEIGHT = 0.7
SOCIAL_LIKE_WEIGHT = 0.3
CONTENT_WEIGHT = 0.4
SOCIAL_WEIGHT = 0.3
TIME_WEIGHT = 0.045
DIARY_COVER_DEFAULT = 'http://hera.s.igengmei.com/2015/10/16/61b745cb36'
# for SLAVE_DB_NAME
SLAVE_DB_NAME = 'default'
# 邀请人筛选条件,优良回答 总数 > 3
INVITER_LIMIT_FORM_ANSWER = 3
INVITE_QUESTION_LIST_PAGE = "/hybrid/question/question_list" # 去回答列表页
SUBJECT = u'用户版-用户反馈崩溃日报'
CRASH_KEYWORDS = ['crash', u'闪退', u'软件崩溃', u'软件问题', u'app问题']
SENDTO = ['linli@igengmei.com']
# model中检索的字段
MODEL_FIELDS = {'diary': ['title'], 'problem': ['ask', 'answer'], 'topicreply': ['content']}
# 日记本质量分
DIARY_CONTENT_LEVEL_SCORE = {
'UNAUDITED': -1000,
'ILLEGAL': -1000,
'BAD': -1000,
'GENERAL': -1000,
'BETTER': -1000, # 新增内容等级 3.5,和郑伟确认先按照 -1000给值
'FINE': 65.0,
'EXCELLENT': 100.0
}
BUILD_SITEMAP_COUNT = 1000
# rating limit
DIARY_RATING_LIMIT = 2
VIDEO_TAG_ID = 4706 # 如果有小视频 就给日记本添加视频日记的tag
# weixin js sdk
# 正式账号
WX_APP_ID = 'wx19c0bdd0c9e25acb'
WX_APP_SECRET = '41855cb5fd32338435b2c7dbaa400716'
WX_USER_ID = 20889703
MIP_LIMIT = 10
# 首页Feed随机比例
DIARY_RANDOM_SCALE = {
"wuhan": 10,
"beijing": 15,
"guangzhou": 10,
"chengdu": 10,
"shanghai": 10,
"chongqing": 10,
"hangzhou": 10,
"shenzhen": 10,
}
ANSWER_NUM_BASELINE = 4 # 回答数基本限制
# 计算回答子评论未读数的起始时间
COUNT_ANSWER_COMMENTED_REPLY_START_TIME = '2018-08-15 15:23:00'
<?xml version="1.0" encoding="utf-8"?>
<gm_rpcd_config>
<info config_name="deploy" version="1.0"/>
<config name="log_dir" value="/data/log/mimas/app"/>
<config name="sentry_dsn" value=""/>
</gm_rpcd_config>
DATABASES = {
'default': { # mysql
'ENGINE': 'django.db.backends.mysql',
# 'NAME': 'mimas_dev',
'NAME': 'mimas_test',
'USER': 'work',
'PASSWORD': 'Gengmei1',
'PASSWORD': 'workwork',
# 'HOST': '127.0.0.1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'HOST': 'rdsmaqevmuzj6jy.mysql.rds.aliyuncs.com',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
......@@ -17,9 +16,9 @@ DATABASES = {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'mimas_dev',
'USER': 'work',
'PASSWORD': 'Gengmei1',
'PASSWORD': 'workwork',
# 'HOST': '127.0.0.1',
'HOST': 'rm-2ze0v6uua2hl9he8e.mysql.rds.aliyuncs.com',
'HOST': 'rdsmaqevmuzj6jy.mysql.rds.aliyuncs.com',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
......@@ -29,15 +28,16 @@ DATABASES = {
}
CELERY_TIMEZONE = 'Asia/Shanghai'
BROKER_URL = 'redis://192.168.168.142:6379/0'
CELERY_BROKER_URL = 'redis://192.168.168.142:6379/0'
BROKER_URL = 'redis://127.0.0.1:6379/2'
CELERY_BROKER_URL = 'redis://127.0.0.1:6379/2'
CELERY_TASK_SERIALIZER = "json"
SENTRY_CELERY_ENDPOINT = ''
BACKEND_API_HOST = 'http://backend-service.default'
BACKEND_API_HOST = 'http://backend.test.env'
DBMW_LOGICAL_DATABASE_ID = 'zhengxing_test'
# 初始化数据
INIT_DATA = True
INIT_DATA = False
# qa hack num
ANSWER_HACK_STRT = '-'
......@@ -48,7 +48,7 @@ MULTI_TOPIC_TAG_ID = 5089
GM_SERIALIZER = {
'redis': {
'host': '192.168.168.142', 'port': 6379, 'db': 1,
'host': '127.0.0.1', 'port': 6379, 'db': 1
}
}
......@@ -56,18 +56,58 @@ GM_SERIALIZER = {
TEST_RUNNER = 'gm_test.runner.GmTestRunner'
REDIS = {
'default': {'host': '192.168.168.142', 'port': 6379, 'db': 0, },
'view': {'host': '192.168.168.142', 'port': 6379, 'db': 1, },
'answer_sort_cache': {'host': '192.168.168.142', 'port': 6379, 'db': 4, },
'high_quality_question_cache': {'host': '192.168.168.142', 'port': 6379, 'db': 5, },
'vote_cache': {'host': '192.168.168.142', 'port': 6379, 'db': 6, },
'page_cache': {'host': '192.168.168.142', 'port': 6379, 'db': 10, },
'social_cache': {'host': '192.168.168.142', 'port': 6379, 'db': 11, },
'user_cache': {'host': '192.168.168.142', 'port': 6379, 'db': 12, },
'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},
'vote_cache': {'host': 'test-redis', 'port': 6379, 'db': 11}, # gaia settings.REDIS['vote_cache']
'page_cache': {'host': '127.0.0.1', 'port': 6379, 'db': 10},
'social_cache': {'host': '127.0.0.1', 'port': 6379, 'db': 11},
'user_cache': {'host': 'test-redis', 'port': 6379, 'db': 5},
}
DATABASE_ROUTERS = ['utils.router.ThreadLocalRouter',]
LIVE_REDIS = {'host': '192.168.168.142', 'port': 6379, 'db': 7, }
DEFAULT_REDIS = {'host': '192.168.168.142', 'port': 6379, 'db': 8, }
TALOS_RPC_CACHE = {'host': '192.168.168.142', 'port': 6379, 'db': 9, }
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}
LIVE_REDIS = {'host': 'redis.test.gengmei', 'port': 6379, 'db': 4}
DEFAULT_REDIS = {'host': 'localhost', 'port': 6379, 'db': 14}
TALOS_RPC_CACHE = {'host': 'test-redis', '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.test.gengmei', 'port': 6379, 'db': 2},
'prefix': ('diary_pv',),
'target': REDIS['view']
},
)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment