Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
physical
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpha
physical
Commits
a695b2a4
Commit
a695b2a4
authored
Dec 11, 2018
by
段英荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify
parent
a60c004f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
26 deletions
+33
-26
app_conf.xml
app_conf.xml
+1
-0
tasks.py
injection/data_sync/tasks.py
+1
-1
settings.py
physical/settings.py
+31
-25
No files found.
app_conf.xml
View file @
a695b2a4
...
@@ -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>
injection/data_sync/tasks.py
View file @
a695b2a4
...
@@ -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
...
...
physical/settings.py
View file @
a695b2a4
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment