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
647c2bba
Commit
647c2bba
authored
Nov 29, 2018
by
段英荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify
parent
87eca9f5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
topic.json
trans2es/mapping/topic.json
+4
-1
topic_transfer.py
trans2es/utils/topic_transfer.py
+7
-6
No files found.
trans2es/mapping/topic.json
View file @
647c2bba
...
...
@@ -16,6 +16,8 @@
"pick_id_list"
:{
"type"
:
"long"
},
"offline_score"
:{
"type"
:
"double"
},
//离线算分
"create_time"
:{
"type"
:
"date"
,
"format"
:
"date_time_no_millis"
},
"update_time"
:{
"type"
:
"date"
,
"format"
:
"date_time_no_millis"
}
"update_time"
:{
"type"
:
"date"
,
"format"
:
"date_time_no_millis"
},
"create_time_val"
:{
"type"
:
"long"
},
"update_time_val"
:{
"type"
:
"long"
}
}
}
\ No newline at end of file
trans2es/utils/topic_transfer.py
View file @
647c2bba
...
...
@@ -5,6 +5,8 @@ import sys
import
logging
import
traceback
from
libs.tools
import
tzlc
import
time
class
TopicTransfer
(
object
):
...
...
@@ -31,15 +33,14 @@ class TopicTransfer(object):
create_time
=
instance
.
create_time
tzlc_create_time
=
tzlc
(
create_time
)
import
time
print
(
"duan add,type:
%
s,val:
%
d,dir:
%
s"
%
(
type
(
tzlc_create_time
),
time
.
mktime
(
tzlc_create_time
.
timetuple
()),
dir
(
tzlc_create_time
)))
res
[
"create_time"
]
=
tzlc
(
create_time
)
res
[
"create_time"
]
=
tzlc_create_time
res
[
"create_time_val"
]
=
time
.
mktime
(
tzlc_create_time
.
timetuple
())
update_time
=
instance
.
update_time
res
[
"update_time"
]
=
tzlc
(
update_time
)
tzlc_update_time
=
tzlc
(
update_time
)
res
[
"update_time"
]
=
tzlc_update_time
res
[
"update_time_val"
]
=
time
.
mktime
(
tzlc_update_time
.
timetuple
())
return
res
except
:
...
...
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