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
020e8d40
Commit
020e8d40
authored
5 years ago
by
赵威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
try 15 data
parent
8e3598d6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
tag3_update_user_portrait_offline.py
eda/smart_rank/tag3_update_user_portrait_offline.py
+4
-4
tool.py
eda/smart_rank/tool.py
+1
-1
No files found.
eda/smart_rank/tag3_update_user_portrait_offline.py
View file @
020e8d40
...
...
@@ -82,10 +82,10 @@ def update_tag3_user_portrait(cl_id):
# TODO doris:user_portrait:tag3:device_id:
# TODO expire time
cl_id_portrait_
key
=
"doris:test:device_id:"
+
str
(
cl_id
)
key
=
"doris:test:device_id:"
+
str
(
cl_id
)
redis_client
=
redis
.
StrictRedis
.
from_url
(
"redis://:ReDis!GmTx*0aN9@172.16.40.173:6379"
)
redis_client
.
set
(
cl_id_portrait_
key
,
json
.
dumps
(
res
))
redis_client
.
expire
(
cl_id_portrait_
key
,
60
*
60
*
24
)
redis_client
.
set
(
key
,
json
.
dumps
(
res
))
redis_client
.
expire
(
key
,
60
*
60
*
24
)
write_user_portrait
(
cl_id
,
","
.
join
(
first_solutions_score
.
keys
()),
","
.
join
(
second_solutions_score
.
keys
()),
","
.
join
(
first_demands_score
.
keys
()),
...
...
@@ -97,7 +97,7 @@ def update_tag3_user_portrait(cl_id):
def
consume_kafka
():
# TODO 30
sql
=
"select distinct cl_id from kafka_tag3_log where log_time > UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 5 day))"
sql
=
"select distinct cl_id from kafka_tag3_log where log_time > UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL
1
5 day))"
db
,
cursor
=
get_jerry_test
()
cursor
.
execute
(
sql
)
device_ids_lst
=
[
i
[
0
]
for
i
in
cursor
.
fetchall
()]
...
...
This diff is collapsed.
Click to expand it.
eda/smart_rank/tool.py
View file @
020e8d40
...
...
@@ -407,7 +407,7 @@ def get_tag3_user_log(cl_id):
# CREATE TABLE `user_tag3_portrait` (
# `id` int(11) NOT NULL AUTO_INCREMENT,
# `date`
int(11)
NOT NULL,
# `date`
text
NOT NULL,
# `cl_id` text NOT NULL,
# `first_solutions` text NOT NULL,
# `second_solutions` text NOT NULL,
...
...
This diff is collapsed.
Click to expand it.
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