Commit 2e427512 authored by 段英荣's avatar 段英荣

modify

parent 4a514df6
...@@ -34,7 +34,10 @@ class TopicTransfer(object): ...@@ -34,7 +34,10 @@ class TopicTransfer(object):
res["group_id"] = -1 res["group_id"] = -1
res["share_num"] = instance.share_num res["share_num"] = instance.share_num
begin = datetime.datetime.now()
res["pick_id_list"] = instance.get_pick_id_info() res["pick_id_list"] = instance.get_pick_id_info()
end = datetime.datetime.now()
time0 = (end-begin).seconds
begin = datetime.datetime.now() begin = datetime.datetime.now()
(topic_tag_id_list, edit_tag_id_list) = instance.get_topic_tag_id_list() (topic_tag_id_list, edit_tag_id_list) = instance.get_topic_tag_id_list()
...@@ -54,11 +57,13 @@ class TopicTransfer(object): ...@@ -54,11 +57,13 @@ class TopicTransfer(object):
end = datetime.datetime.now() end = datetime.datetime.now()
time3 = (end-begin).seconds time3 = (end-begin).seconds
begin = datetime.datetime.now()
res["manual_score"] = instance.drop_score res["manual_score"] = instance.drop_score
res["has_image"] = instance.topic_has_image() res["has_image"] = instance.topic_has_image()
res["has_video"] = instance.has_video res["has_video"] = instance.has_video
res["language_type"] = instance.language_type res["language_type"] = instance.language_type
end = datetime.datetime.now()
time4 = (end-begin).seconds
# # 片假名 # # 片假名
# re_jp_pian_words = re.compile(u"[\u30a0-\u30ff]+") # re_jp_pian_words = re.compile(u"[\u30a0-\u30ff]+")
...@@ -85,7 +90,7 @@ class TopicTransfer(object): ...@@ -85,7 +90,7 @@ class TopicTransfer(object):
res["update_time"] = tzlc_update_time res["update_time"] = tzlc_update_time
res["update_time_val"] = int(time.mktime(tzlc_update_time.timetuple())) res["update_time_val"] = int(time.mktime(tzlc_update_time.timetuple()))
logging.info("test topic transfer time cost,time1:%d,time2:%d,time3:%d" % (time1,time2,time3)) logging.info("test topic transfer time cost,time0:%d,time1:%d,time2:%d,time3:%d,time4:%d" % (time0,time1,time2,time3,time4))
return res return res
except: except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc()) logging.error("catch exception,err_msg:%s" % traceback.format_exc())
......
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