Commit 28de971f authored by 谢祁峰's avatar 谢祁峰

fix

parent 2852795f
...@@ -644,9 +644,7 @@ class CollectData(object): ...@@ -644,9 +644,7 @@ class CollectData(object):
# (客户端创建回答,后台创建回答或修改回答关联标签关键字进linucb # (客户端创建回答,后台创建回答或修改回答关联标签关键字进linucb
elif 'SYS' in data and 'APP' in data and 'action' in data['SYS'] and \ elif 'SYS' in data and 'APP' in data and 'action' in data['SYS'] and \
("venus/community/topic/create" in str(data['SYS'].get('action',"")) or ("venus/community/topic/create" in str(data['SYS'].get('action',"")) or
"venus/sun/topic/edit" in str(data['SYS'].get('action',"")) or "venus/sun/topic/edit" in str(data['SYS'].get('action',""))
"venus/community/survey_question/record_kyc_last_question" in str(data['SYS'].get('action',"")) or
"venus/sun/pictorial/edit" in str(data['SYS'].get('action', ""))
): ):
action=str(data['SYS'].get('action','')) action=str(data['SYS'].get('action',''))
logging.info("action=%s"%(action)) logging.info("action=%s"%(action))
...@@ -662,21 +660,39 @@ class CollectData(object): ...@@ -662,21 +660,39 @@ class CollectData(object):
logging.info("%s,device_id:%s,tag_list:%s" % (action, logging.info("%s,device_id:%s,tag_list:%s" % (action,
str(device_id), str(tag_list))) str(device_id), str(tag_list)))
# 创建问题关注标签关键字进linucb # 创建问题关注标签关键字进linucb
# elif 'SYS' in data and 'APP' in data and 'action' in data['SYS'] and \ elif 'SYS' in data and 'APP' in data and 'action' in data['SYS'] and \
# ): "venus/sun/pictorial/edit" in str(data['SYS'].get('action',"")):
#
# logging.info("action=venus/sun/pictorial/edit") action = str(data['SYS'].get('action', ''))
# tag_ids = list(data["APP"].get("tag_ids", [])) logging.info("action=%s" % (action))
# tag_list = list(Tag.objects.using(settings.SLAVE1_DB_NAME).filter( tag_ids = list(data["APP"].get("tag_ids", []))
# id__in=tag_ids, is_online=True, is_deleted=False, tag_list = list(Tag.objects.using(settings.SLAVE1_DB_NAME).filter(
# is_category=False).values_list("id")) id__in=tag_ids, is_online=True, is_deleted=False,
# device_id = data["SYS"]["cl_id"] is_category=False).values_list("id"))
# user_id = data['SYS'].get('user_id', None) device_id = data["SYS"]["cl_id"]
# self.transfer_update_recommend_tag_list(device_id, user_feature, user_id, user_id = data['SYS'].get('user_id', None)
# tag_list, self.transfer_update_recommend_tag_list(device_id, user_feature, user_id,
# 20) tag_list,
# logging.info("venus/sun/pictorial/edit,device_id:%s,tag_list:%s" % ( 20)
# str(device_id), str(tag_list))) logging.info("%s,device_id:%s,tag_list:%s" % (action,
str(device_id), str(tag_list)))
# kyc最后一题
elif 'SYS' in data and 'APP' in data and 'action' in data['SYS'] and \
"venus/community/survey_question/record_kyc_last_question" in str(data['SYS'].get('action',"")):
action = str(data['SYS'].get('action', ''))
logging.info("action=%s" % (action))
tag_ids = list(data["APP"].get("tag_ids", []))
tag_list = list(Tag.objects.using(settings.SLAVE1_DB_NAME).filter(
id__in=tag_ids, is_online=True, is_deleted=False,
is_category=False).values_list("id"))
device_id = data["SYS"]["cl_id"]
user_id = data['SYS'].get('user_id', None)
self.transfer_update_recommend_tag_list(device_id, user_feature, user_id,
tag_list,
5)
logging.info("%s,device_id:%s,tag_list:%s" % (action,
str(device_id), str(tag_list)))
else: else:
if msg: if msg:
logging.warning( logging.warning(
......
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