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
73331e88
Commit
73331e88
authored
Oct 31, 2019
by
高雅喆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户历史订单tag写redis
parent
77e2d161
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
dist_update_user_history_order_tags.py
eda/smart_rank/dist_update_user_history_order_tags.py
+4
-0
No files found.
eda/smart_rank/dist_update_user_history_order_tags.py
View file @
73331e88
...
@@ -72,6 +72,10 @@ def get_user_history_order_service_tag(user_id, stat_date):
...
@@ -72,6 +72,10 @@ def get_user_history_order_service_tag(user_id, stat_date):
tags_list_json
=
json
.
dumps
(
tags_list
)
tags_list_json
=
json
.
dumps
(
tags_list
)
gm_kv_cli
.
set
(
user_history_order_tags_key
,
tags_list_json
)
gm_kv_cli
.
set
(
user_history_order_tags_key
,
tags_list_json
)
gm_kv_cli
.
expire
(
user_history_order_tags_key
,
time
=
30
*
24
*
60
*
60
)
gm_kv_cli
.
expire
(
user_history_order_tags_key
,
time
=
30
*
24
*
60
*
60
)
# 写redis
redis_client
=
redis
.
StrictRedis
.
from_url
(
'redis://:ReDis!GmTx*0aN9@172.16.40.173:6379'
)
redis_client
.
set
(
user_history_order_tags_key
,
tags_list_json
)
redis_client
.
expire
(
user_history_order_tags_key
,
time
=
30
*
24
*
60
*
60
)
# 写tidb
# 写tidb
sql_cl_id
=
"select device_id from statistic_device where id = (select max(device_id) from statistic_device_user where user_id =
%
d) "
%
(
int
(
user_id
))
sql_cl_id
=
"select device_id from statistic_device where id = (select max(device_id) from statistic_device_user where user_id =
%
d) "
%
(
int
(
user_id
))
cur_zhengxing
.
execute
(
sql_cl_id
)
cur_zhengxing
.
execute
(
sql_cl_id
)
...
...
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