Commit 2e956207 authored by 李小芳's avatar 李小芳

更新es的配置

parent b7b9b9c4
......@@ -8,13 +8,14 @@ from social.models import UserFollow
from trans2es.type_info import get_type_info_map
from gaia.routers import thread_local
from rpc.all import get_rpc_remote_invoker
from search.utils.es import get_talos_es7_service
@shared_task
@thread_local(DB_FOR_READ_OVERRIDE=settings.DBMW_SLAVE_DB_NAME)
def write_to_es(es_type, pk_list, configuration, use_batch_query_set=False, es_config=None):
if es_type in ["service", 'sku']:
es_config = False
es_config = [get_talos_es7_service]
pk_list = list(frozenset(pk_list))
type_info_map = get_type_info_map()
......
......@@ -347,7 +347,6 @@ class Diary(models.Model):
def get_update_time_stratific(self, create_time):
try:
now = datetime.datetime.now()
d2 = datetime.datetime.strptime(now.strftime('%Y-%m-%d %H:%M:%S'), '%Y-%m-%d %H:%M:%S')
delta_30 = datetime.timedelta(days=30)
......
......@@ -62,7 +62,6 @@ def get_talos_es6_instance():
def get_es_list_by_type(es_type, es_config=None):
if es_type in ['service', 'sku']:
if es_config == True:
es_list = [get_talos_es6_instance()]
else:
......
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