Commit d33a5c29 authored by lixiaofang's avatar lixiaofang

add

parent 552ed6c9
# -*- coding: UTF-8 -*- # -*- coding: UTF-8 -*-
import logging
import traceback
import json
from celery import shared_task 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 traceback
from libs.cache import redis_client from libs.cache import redis_client
from trans2es.models.face_user_contrast_similar import FaceUserContrastSimilar,UserSimilarScore from trans2es.models.face_user_contrast_similar import FaceUserContrastSimilar,UserSimilarScore
import json
from linucb.utils.register_user_tag import RegisterUserTag from linucb.utils.register_user_tag import RegisterUserTag
@shared_task @shared_task
......
...@@ -6,7 +6,6 @@ from celery import shared_task ...@@ -6,7 +6,6 @@ from celery import shared_task
login_url = "http://earth.igengmei.com/api/account/login_pwd" login_url = "http://earth.igengmei.com/api/account/login_pwd"
def index_first(): def index_first():
try: try:
r1 = requests.get(login_url) r1 = requests.get(login_url)
...@@ -19,7 +18,7 @@ def index_first(): ...@@ -19,7 +18,7 @@ def index_first():
@shared_task @shared_task
def get_cook(): def get_cook():
data = open("majia_email") data = open("majia_email","r")
list = [] list = []
dicts = {} dicts = {}
......
# coding=utf-8 # coding=utf-8
from __future__ import unicode_literals, print_function, absolute_import from __future__ import unicode_literals, print_function, absolute_import
import itertools
from django.conf import settings from django.conf import settings
import itertools
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',
# ], ],
# "majia-alpha": [ # "majia-alpha": [
# 'injection.data_sync.auto_instant_click.auto_click', # 'injection.data_sync.auto_instant_click.auto_click',
# ], # ],
......
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