Commit be937165 authored by lixiaofang's avatar lixiaofang

add

parent e6ef460d
from injection.data_sync.tasks import write_to_es
result = write_to_es.delay('associate_tag', [1323], False)
result = write_to_es.delay('associate_tag', [1], False)
print(result.read())
print(result)
......@@ -18,6 +18,7 @@ from libs.cache import redis_client
@shared_task
def write_to_es(es_type, pk_list, use_batch_query_set=False):
logging.info("get -----------------")
logging.info("consume es_type:%s" % str(es_type))
try:
......@@ -47,4 +48,4 @@ def write_to_es(es_type, pk_list, use_batch_query_set=False):
)
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())git
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
......@@ -30,4 +30,5 @@ class CeleryTaskRouter(object):
"""
queue_name_or_none = self.task_queue_map.get(task)
logging.info("task_queue_map:%s" % queue_name_or_none)
return queue_name_or_none
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