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
66286a09
Commit
66286a09
authored
Sep 30, 2019
by
高雅喆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工厂模式,查询用户lin信息增加灰度,删除掉无用接口
parent
b36986a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
topic.py
search/views/topic.py
+5
-2
No files found.
search/views/topic.py
View file @
66286a09
...
...
@@ -884,7 +884,7 @@ def get_edit_tag_name(tag_lst):
@bind
(
"physical/search/device_linucb_tag_debug"
)
def
get_device_linucb_tag2
(
device_id
=
None
,
size
=
20
,
has_score
=
False
):
def
get_device_linucb_tag2
(
device_id
=
None
,
size
=
20
,
has_score
=
False
,
gray_list
=
[]
):
# {
# "lincub": [{"id": 1, "name": 名字}, {"id": 2, "name": 名字}, {"id": 3, "name": 名字}, {"id": 5, "name": 名字},
# {"id": 6, "name": 名字}, ]
...
...
@@ -892,7 +892,10 @@ def get_device_linucb_tag2(device_id=None, size=20, has_score=False):
try
:
user_feature
=
[
1
,
1
]
if
device_id
:
linucb_matrix_redis_prefix
=
"physical:linucb:device_id:"
if
STRATEGY_TYPE
.
CTR_GRAY
in
gray_list
:
linucb_matrix_redis_prefix
=
"ctr_physical:linucb:device_id:"
else
:
linucb_matrix_redis_prefix
=
"physical:linucb:device_id:"
redis_key
=
linucb_matrix_redis_prefix
+
str
(
device_id
)
redis_linucb_tag_data_dict
=
redis_client
.
hgetall
(
redis_key
)
if
len
(
redis_linucb_tag_data_dict
)
==
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