Commit 5fe8ae22 authored by haowang's avatar haowang

add log in batch create topic

parent 554e53e7
......@@ -7,6 +7,7 @@ from api.cache.cache import ins_cache
from libs.user import get_user_by_ids
from alpha_types.venus import ERROR as CODES
from alpha_types.venus import GRAP_PLATFORM
from engine.logger import info_logger
topic_id_cache = "ins_account_cache"
......@@ -27,6 +28,16 @@ class CreateTopicForBatch(BaseView):
topic_list = json.loads(request.POST.get("topic_list", '[]'))
pictorial_tag_ids = json.loads(request.POST.get("tag_ids", '[]'))
info_logger.info({
'user_id': user_id,
'card_level': card_level,
'tag_id': tag_id,
'is_online': is_online,
'platform': platform,
'topic_list': topic_list,
'pictorial_tag_ids': pictorial_tag_ids,
})
if not user_id:
return self.parameter_invalid_response()
......@@ -108,12 +119,21 @@ class CreateTopicForBatch(BaseView):
tags = tag_names
# 先创建标签
info_logger.info({
'api': 'venus/community/tag/batch_create_tag_by_name',
'tags': tags,
'is_own': 1,
})
_tag_error, _tag_data = self.call_rpc(
"venus/community/tag/batch_create_tag_by_name",
tags=tags, is_own=1
)
if _tag_error:
return self.error(_tag_error)
info_logger.info({
'api': 'venus/community/tag/batch_create_tag_by_name',
'_tag_data': _tag_data,
})
#_tag_data.update(location_tags)
# 更新发帖
......@@ -137,6 +157,10 @@ class CreateTopicForBatch(BaseView):
for tag_name in tags if _tag_data.get(tag_name)
]
info_logger.info({
'api': 'venus/community/topic/batch_create_for_inner',
'topic_list': topic_list,
})
create_err, result = self.call_rpc(
"venus/community/topic/batch_create_for_inner",
topic_list=topic_list
......
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