Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
physical
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
physical
Commits
2e427512
Commit
2e427512
authored
Mar 11, 2019
by
段英荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify
parent
4a514df6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
topic_transfer.py
trans2es/utils/topic_transfer.py
+7
-2
No files found.
trans2es/utils/topic_transfer.py
View file @
2e427512
...
...
@@ -34,7 +34,10 @@ class TopicTransfer(object):
res
[
"group_id"
]
=
-
1
res
[
"share_num"
]
=
instance
.
share_num
begin
=
datetime
.
datetime
.
now
()
res
[
"pick_id_list"
]
=
instance
.
get_pick_id_info
()
end
=
datetime
.
datetime
.
now
()
time0
=
(
end
-
begin
)
.
seconds
begin
=
datetime
.
datetime
.
now
()
(
topic_tag_id_list
,
edit_tag_id_list
)
=
instance
.
get_topic_tag_id_list
()
...
...
@@ -54,11 +57,13 @@ class TopicTransfer(object):
end
=
datetime
.
datetime
.
now
()
time3
=
(
end
-
begin
)
.
seconds
begin
=
datetime
.
datetime
.
now
()
res
[
"manual_score"
]
=
instance
.
drop_score
res
[
"has_image"
]
=
instance
.
topic_has_image
()
res
[
"has_video"
]
=
instance
.
has_video
res
[
"language_type"
]
=
instance
.
language_type
end
=
datetime
.
datetime
.
now
()
time4
=
(
end
-
begin
)
.
seconds
# # 片假名
# re_jp_pian_words = re.compile(u"[\u30a0-\u30ff]+")
...
...
@@ -85,7 +90,7 @@ class TopicTransfer(object):
res
[
"update_time"
]
=
tzlc_update_time
res
[
"update_time_val"
]
=
int
(
time
.
mktime
(
tzlc_update_time
.
timetuple
()))
logging
.
info
(
"test topic transfer time cost,time
1:
%
d,time2:
%
d,time3:
%
d"
%
(
time1
,
time2
,
time3
))
logging
.
info
(
"test topic transfer time cost,time
0:
%
d,time1:
%
d,time2:
%
d,time3:
%
d,time4:
%
d"
%
(
time0
,
time1
,
time2
,
time3
,
time4
))
return
res
except
:
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment