Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
ffm-baseline
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ML
ffm-baseline
Commits
3c92e69b
Commit
3c92e69b
authored
Aug 07, 2020
by
赵威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update tags
parent
89fb67a8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tag3_portrait_to_es.py
eda/smart_rank/tag3_portrait_to_es.py
+2
-2
No files found.
eda/smart_rank/tag3_portrait_to_es.py
View file @
3c92e69b
...
...
@@ -58,7 +58,7 @@ def write_to_es(device_id):
first_solutions_d
=
d
.
get
(
"first_solutions"
,
{})
second_solutions_d
=
d
.
get
(
"second_solutions"
,
{})
projects_d
=
d
.
get
(
"projects"
,
{})
anecdote_tags
=
d
.
get
(
"anecdote_tags"
,
[]
)
anecdote_tags
=
d
.
get
(
"anecdote_tags"
,
{}
)
body
[
"device_id"
]
=
device_id
body
[
"last_modified"
]
=
datetime
.
datetime
.
strftime
(
datetime
.
datetime
.
now
(
pytz
.
timezone
(
"Asia/Shanghai"
)),
...
...
@@ -70,7 +70,7 @@ def write_to_es(device_id):
body
[
"first_solutions"
]
=
_dict_to_name_score
(
first_solutions_d
)
body
[
"second_solutions"
]
=
_dict_to_name_score
(
second_solutions_d
)
body
[
"projects"
]
=
_dict_to_name_score
(
projects_d
)
body
[
"anecdote_tags"
]
=
anecdote_tags
body
[
"anecdote_tags"
]
=
_dict_to_name_score
(
anecdote_tags
)
es_insert_device_info
(
device_id
,
body
)
...
...
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