Commit a695b2a4 authored by 段英荣's avatar 段英荣

modify

parent a60c004f
...@@ -12,5 +12,6 @@ ...@@ -12,5 +12,6 @@
<element value="search.views.pick"/> <element value="search.views.pick"/>
<element value="search.views.group"/> <element value="search.views.group"/>
<element value="search.views.user"/> <element value="search.views.user"/>
<element value="injection.data_sync.tasks"/>
</config> </config>
</gm_rpcd_config> </gm_rpcd_config>
...@@ -4,7 +4,7 @@ from celery import shared_task ...@@ -4,7 +4,7 @@ from celery import shared_task
from django.conf import settings from django.conf import settings
from django.core import serializers from django.core import serializers
from trans2es.type_info import get_type_info_map from trans2es.type_info import get_type_info_map
from rpc.all import get_rpc_remote_invoker #from rpc.all import get_rpc_remote_invoker
from libs.es import ESPerform from libs.es import ESPerform
import logging import logging
......
...@@ -33,27 +33,23 @@ ALLOWED_HOSTS = [] ...@@ -33,27 +33,23 @@ ALLOWED_HOSTS = []
SENTRY_CELERY_ENDPOINT="http://60b0004c8884420f8067fb32fc3ed244:20f97fc73ffa4aad9735d0e6542a6d78@sentry.igengmei.com/140" SENTRY_CELERY_ENDPOINT="http://60b0004c8884420f8067fb32fc3ed244:20f97fc73ffa4aad9735d0e6542a6d78@sentry.igengmei.com/140"
BROKER_URL = "redis://127.0.0.1:6379/8" BROKER_URL = "redis://127.0.0.1:6379/8"
CELERY_SEND_EVENTS = True # CELERY_SEND_EVENTS = True
CELERY_SEND_TASK_SENT_EVENT = True # CELERY_SEND_TASK_SENT_EVENT = True
#
CELERY_DEFAULT_EXCHANGE = 'celery' # CELERY_DEFAULT_EXCHANGE = 'celery'
CELERY_DEFAULT_EXCHANGE_TYPE = 'direct' # CELERY_DEFAULT_EXCHANGE_TYPE = 'direct'
CELERY_DEFAULT_ROUTING_KEY = 'celery' # CELERY_DEFAULT_ROUTING_KEY = 'celery'
#
CELERY_QUEUES = { # CELERY_QUEUES = {
'celery': { # 'celery': {
'exchange': CELERY_DEFAULT_EXCHANGE, # 'exchange': CELERY_DEFAULT_EXCHANGE,
'routing_key': CELERY_DEFAULT_ROUTING_KEY, # 'routing_key': CELERY_DEFAULT_ROUTING_KEY,
}, # },
'order': { # 'order': {
'exchange': 'order', # 'exchange': 'order',
'routing_key': 'order', # 'routing_key': 'order',
}, # },
# 'dbmw': { # }
# 'exchange': 'dbmw',
# 'routing_key': 'dbmw',
# },
}
CELERY_BROKER_URL = "redis://127.0.0.1:6379/8" CELERY_BROKER_URL = "redis://127.0.0.1:6379/8"
CELERY_TIMEZONE = 'Asia/Shanghai' CELERY_TIMEZONE = 'Asia/Shanghai'
...@@ -66,7 +62,6 @@ INSTALLED_APPS = ( ...@@ -66,7 +62,6 @@ INSTALLED_APPS = (
'django.contrib.sessions', 'django.contrib.sessions',
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'raven.contrib.django.raven_compat',
'trans2es', 'trans2es',
'search', 'search',
'injection.data_sync', 'injection.data_sync',
...@@ -145,6 +140,17 @@ ES_INFO_LIST = [ ...@@ -145,6 +140,17 @@ ES_INFO_LIST = [
ES_INDEX_PREFIX="gm-dbmw" ES_INDEX_PREFIX="gm-dbmw"
MIDDLEWARE_CLASSES = (
'gm_tracer.middleware.TracerMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'helios.DjangoL5dMiddleware',
)
# Password validation # Password validation
# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators # https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
...@@ -156,9 +162,9 @@ ES_INDEX_PREFIX="gm-dbmw" ...@@ -156,9 +162,9 @@ ES_INDEX_PREFIX="gm-dbmw"
# #
TIME_ZONE = 'Asia/Shanghai' TIME_ZONE = 'Asia/Shanghai'
# #
# USE_I18N = True USE_I18N = True
#
# USE_L10N = True USE_L10N = True
# #
# USE_TZ = True # USE_TZ = True
......
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