Commit c0e07516 authored by lixiaofang's avatar lixiaofang

ad

parent 59e9675f
...@@ -4,4 +4,6 @@ import pymysql ...@@ -4,4 +4,6 @@ import pymysql
from _celery import app as celery_app from _celery import app as celery_app
pymysql.install_as_MySQLdb() pymysql.install_as_MySQLdb()
#__all__ = ('celery_app',) __all__ = ('celery_app',)
...@@ -6,10 +6,12 @@ import itertools ...@@ -6,10 +6,12 @@ import itertools
from django.conf import settings from django.conf import settings
import logging import logging
class CeleryTaskRouter(object): class CeleryTaskRouter(object):
queue_task_map = { queue_task_map = {
"tapir-alpha":[ "tapir-alpha": [
'injection.data_sync.tasks.write_to_es', 'injection.data_sync.tasks.write_to_es',
'injection.data_sync.tasks.sync_face_similar_data_to_redis',
] ]
} }
......
...@@ -18,7 +18,6 @@ from celery.schedules import crontab ...@@ -18,7 +18,6 @@ from celery.schedules import crontab
# Build paths inside the project like this: os.path.join(BASE_DIR, ...) # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production # Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/ # See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/
...@@ -30,9 +29,8 @@ DEBUG = False ...@@ -30,9 +29,8 @@ DEBUG = False
ALLOWED_HOSTS = [] ALLOWED_HOSTS = []
# Application definition # Application definition
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
...@@ -145,7 +143,7 @@ DATABASES = { ...@@ -145,7 +143,7 @@ DATABASES = {
'PASSWORD': 'Gengmei123', 'PASSWORD': 'Gengmei123',
'HOST': 'rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com', 'HOST': 'rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com',
'PORT': '3306', 'PORT': '3306',
#'CONN_MAX_AGE': None, # 'CONN_MAX_AGE': None,
'OPTIONS': { 'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;", "init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", "charset": "utf8mb4",
...@@ -160,7 +158,7 @@ ES_INFO_LIST = [ ...@@ -160,7 +158,7 @@ ES_INFO_LIST = [
} }
] ]
ES_INDEX_PREFIX="gm-dbmw" ES_INDEX_PREFIX = "gm-dbmw"
MIDDLEWARE_CLASSES = ( MIDDLEWARE_CLASSES = (
'gm_tracer.middleware.TracerMiddleware', 'gm_tracer.middleware.TracerMiddleware',
......
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