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
f5c12622
Commit
f5c12622
authored
Aug 23, 2019
by
段英荣
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'topic_detail_page_recommend_clean' into 'master'
list transform See merge request
alpha/physical!437
parents
54048949
c33b3ed2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
collect_data.py
linucb/views/collect_data.py
+3
-3
No files found.
linucb/views/collect_data.py
View file @
f5c12622
...
@@ -60,7 +60,7 @@ class CollectData(object):
...
@@ -60,7 +60,7 @@ class CollectData(object):
try
:
try
:
redis_linucb_tag_data_dict
=
self
.
_get_user_linucb_info
(
device_id
)
redis_linucb_tag_data_dict
=
self
.
_get_user_linucb_info
(
device_id
)
if
len
(
redis_linucb_tag_data_dict
)
==
0
:
if
len
(
redis_linucb_tag_data_dict
)
==
0
:
recommend_tag_list
=
LinUCB
.
get_default_tag_list
(
user_id
)
recommend_tag_list
=
list
(
LinUCB
.
get_default_tag_list
(
user_id
)
)
LinUCB
.
init_device_id_linucb_info
(
redis_client
,
self
.
linucb_matrix_redis_prefix
,
device_id
,
recommend_tag_list
)
LinUCB
.
init_device_id_linucb_info
(
redis_client
,
self
.
linucb_matrix_redis_prefix
,
device_id
,
recommend_tag_list
)
else
:
else
:
user_feature
=
user_feature
if
user_feature
else
self
.
user_feature
user_feature
=
user_feature
if
user_feature
else
self
.
user_feature
...
@@ -292,9 +292,9 @@ class CollectData(object):
...
@@ -292,9 +292,9 @@ class CollectData(object):
# if len(exposure_sql_query_results)>0:
# if len(exposure_sql_query_results)>0:
if
len
(
tagid_list
)
>
0
:
if
len
(
tagid_list
)
>
0
:
tag_query_results
=
Tag
.
objects
.
using
(
settings
.
SLAVE_DB_NAME
)
.
filter
(
tag_query_results
=
list
(
Tag
.
objects
.
using
(
settings
.
SLAVE_DB_NAME
)
.
filter
(
id__in
=
tagid_list
,
is_online
=
True
,
is_deleted
=
False
,
id__in
=
tagid_list
,
is_online
=
True
,
is_deleted
=
False
,
is_category
=
False
)
.
values_list
(
"id"
,
flat
=
True
)
is_category
=
False
)
.
values_list
(
"id"
,
flat
=
True
)
)
is_click
=
1
is_click
=
1
is_vote
=
0
is_vote
=
0
...
...
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