Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
gm_strategy_cvr
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
rank
gm_strategy_cvr
Commits
39b08cc5
Commit
39b08cc5
authored
Jul 23, 2020
by
赵威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update field name
parent
f34eaab7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
portrait.py
src/utils/portrait.py
+5
-5
No files found.
src/utils/portrait.py
View file @
39b08cc5
...
...
@@ -33,7 +33,7 @@ def get_before_5_days_date():
return
[
getdate
(
i
)
for
i
in
range
(
5
)]
def
user_portrait_tag3_get_candidate_key
(
device_id
,
content_type
,
latest
=
False
):
def
_
user_portrait_tag3_get_candidate_key
(
device_id
,
content_type
,
latest
=
False
):
"""
content_type: diary, tractate, answer
"""
...
...
@@ -43,12 +43,12 @@ def user_portrait_tag3_get_candidate_key(device_id, content_type, latest=False):
return
key
def
get_user_portrait_tag3_read_key_v2
(
device_id
,
content_type
):
def
_
get_user_portrait_tag3_read_key_v2
(
device_id
,
content_type
):
return
"doris:user_portrait:tag3:read_v2:device_id:{}:content_type:{}"
.
format
(
device_id
,
content_type
)
def
get_user_portrait_tag3_read_v2
(
device_id
,
content_type
):
key
=
get_user_portrait_tag3_read_key_v2
(
device_id
,
content_type
)
key
=
_
get_user_portrait_tag3_read_key_v2
(
device_id
,
content_type
)
date_list_dict
=
redis_client2
.
hgetall
(
key
)
read_list_v2
=
[]
today_read
=
[]
...
...
@@ -66,7 +66,7 @@ def get_user_portrait_tag3_read_v2(device_id, content_type):
def
user_portrait_tag3_get_candidate_dict
(
device_id
,
content_type
,
latest
=
False
):
key
=
user_portrait_tag3_get_candidate_key
(
device_id
,
content_type
,
latest
)
key
=
_
user_portrait_tag3_get_candidate_key
(
device_id
,
content_type
,
latest
)
res
=
redis_client4
.
get
(
key
)
if
res
:
return
json
.
loads
(
res
)
...
...
@@ -80,5 +80,5 @@ def user_portrait_tag3_get_candidate_unread_list(device_id, content_type):
return: []
"""
read_list
,
_
=
get_user_portrait_tag3_read_v2
(
device_id
,
content_type
)
candidate_list
=
list
(
user_portrait_tag3_get_candidate_
key
(
device_id
,
content_type
)
.
values
())
candidate_list
=
list
(
user_portrait_tag3_get_candidate_
dict
(
device_id
,
content_type
)
.
values
())
return
get_n_unread_data_from_ids
(
candidate_list
,
500
,
read_list
)
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