Commit 18bbf513 authored by 谢祁峰's avatar 谢祁峰

add user action log

parent 6a407362
......@@ -630,6 +630,7 @@ class CollectData(object):
# 首页搜索精准匹配标签关键字进linucb
elif 'SYS' in data and 'APP' in data and 'action' in data['SYS'] and \
"api/v1/cards/topic" in data['SYS']['action']:
logging.info("action=api/v1/cards/topic")
tag_name = data["APP"].get("query", [])
tag_list = list(Tag.objects.using(settings.SLAVE1_DB_NAME).filter(
tag=tag_name).values_list("id"))
......@@ -638,10 +639,13 @@ class CollectData(object):
self.transfer_update_recommend_tag_list(device_id, user_feature, user_id,
tag_list,
5)
logging.info(
"api/v1/cards/topic,device_id:%s,tag_list:%s" % (str(device_id), str(tag_list)))
# (客户端创建回答,后台创建回答或修改回答关联标签关键字进linucb
elif 'SYS' in data and 'APP' in data and 'action' in data['SYS'] and \
("venus/community/topic/create" in data['SYS'][
'action'] or "venus/sun/topic/edit" in data['SYS']['action']):
logging.info("action=venus/community/topic/create")
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,
......@@ -651,9 +655,12 @@ class CollectData(object):
self.transfer_update_recommend_tag_list(device_id, user_feature, user_id,
tag_list,
10)
logging.info("venus/community/topic/create,device_id:%s,tag_list:%s" % (
str(device_id), str(tag_list)))
# 创建问题关注标签关键字进linucb
elif 'SYS' in data and 'APP' in data and 'action' in data['SYS'] and \
"venus/sun/pictorial/edit" in data['SYS']['action']:
logging.info("action=venus/sun/pictorial/edit")
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,
......@@ -663,6 +670,8 @@ class CollectData(object):
self.transfer_update_recommend_tag_list(device_id, user_feature, user_id,
tag_list,
20)
logging.info("venus/sun/pictorial/edit,device_id:%s,tag_list:%s" % (
str(device_id), str(tag_list)))
else:
if msg:
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