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
alpha
physical
Commits
a276c897
Commit
a276c897
authored
Oct 18, 2019
by
谢祁峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
0795d15b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
collect_data.py
linucb/views/collect_data.py
+10
-10
No files found.
linucb/views/collect_data.py
View file @
a276c897
...
...
@@ -617,14 +617,14 @@ class CollectData(object):
'SYS'
]
and
"api/v1/cards/topic"
in
\
data
[
'SYS'
][
'action'
]:
tag_name
=
raw_val_dict
[
"APP"
]
.
get
(
"query"
,
""
)
tag_id
=
raw_val_dict
[
"APP"
]
.
get
(
"action
"
)
tag_name
=
data
[
"APP"
]
.
get
(
"query"
,
""
)
tag_id
=
data
[
"APP"
]
.
get
(
"tag_id"
,
"
"
)
tag_list
=
list
(
Tag
.
objects
.
using
(
settings
.
SLAVE1_DB_NAME
)
.
filter
(
tag
=
tag_name
)
.
values_list
(
"id"
))
tag_list
.
append
(
tag_id
)
logging
.
info
(
"action=home_page_search,tagid_list:
%
s"
%
tag_list
)
device_id
=
raw_val_dict
[
"device"
][
"device_id"
]
user_id
=
raw_val_dict
[
"user_id"
]
if
"user_id"
in
raw_val_dict
else
None
device_id
=
data
[
'SYS'
][
'cl_id'
]
user_id
=
data
[
'SYS'
]
.
get
(
'user_id'
,
None
)
self
.
transfer_update_recommend_tag_list
(
device_id
,
user_feature
,
user_id
,
tag_list
,
5
)
logging
.
info
(
"action=home_page_search,update lintag success"
)
...
...
@@ -632,24 +632,24 @@ class CollectData(object):
elif
'SYS'
in
data
and
'APP'
in
data
and
'action'
in
data
[
'SYS'
]
and
\
(
"venus/community/topic/create"
in
data
[
'SYS'
][
'action'
]
or
"venus/sun/topic/edit"
in
data
[
'SYS'
][
'action'
]):
tag_ids
=
list
(
raw_val_dict
[
"APP"
]
.
get
(
"tag_ids"
,
[]))
tag_ids
=
list
(
data
[
"APP"
]
.
get
(
"tag_ids"
,
[]))
tag_list
=
list
(
Tag
.
objects
.
using
(
settings
.
SLAVE1_DB_NAME
)
.
filter
(
id__in
=
tag_ids
,
is_online
=
True
,
is_deleted
=
False
,
is_category
=
False
)
.
values_list
(
"id"
))
device_id
=
raw_val_dict
[
"device"
][
"device_id"
]
user_id
=
raw_val_dict
[
"user_id"
]
if
"user_id"
in
raw_val_dict
else
None
device_id
=
data
[
'SYS'
][
'cl_id'
]
user_id
=
data
[
'SYS'
]
.
get
(
'user_id'
,
None
)
self
.
transfer_update_recommend_tag_list
(
device_id
,
user_feature
,
user_id
,
tag_list
,
10
)
# 创建问题关注标签关键字进linucb
elif
'SYS'
in
data
and
'APP'
in
data
and
'action'
in
data
[
'SYS'
]
and
\
"venus/sun/pictorial/edit"
in
data
[
'SYS'
][
'action'
]:
tag_ids
=
list
(
raw_val_dict
[
"APP"
]
.
get
(
"tag_ids"
,
[]))
tag_ids
=
list
(
data
[
"APP"
]
.
get
(
"tag_ids"
,
[]))
tag_list
=
list
(
Tag
.
objects
.
using
(
settings
.
SLAVE1_DB_NAME
)
.
filter
(
id__in
=
tag_ids
,
is_online
=
True
,
is_deleted
=
False
,
is_category
=
False
)
.
values_list
(
"id"
))
device_id
=
raw_val_dict
[
"device"
][
"device_id"
]
user_id
=
raw_val_dict
[
"user_id"
]
if
"user_id"
in
raw_val_dict
else
None
device_id
=
data
[
'SYS'
][
'cl_id'
]
user_id
=
data
[
'SYS'
]
.
get
(
'user_id'
,
None
)
self
.
transfer_update_recommend_tag_list
(
device_id
,
user_feature
,
user_id
,
tag_list
,
20
)
...
...
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