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
b3cf9c5e
Commit
b3cf9c5e
authored
May 27, 2020
by
任婷婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
5ef47857
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
tag3_update_user_portrait_offline.py
eda/smart_rank/tag3_update_user_portrait_offline.py
+6
-0
tool.py
eda/smart_rank/tool.py
+0
-5
No files found.
eda/smart_rank/tag3_update_user_portrait_offline.py
View file @
b3cf9c5e
...
...
@@ -153,7 +153,13 @@ def update_tag3_user_portrait(cl_id):
def
consume_kafka
():
sql
=
"select distinct cl_id from kafka_tag3_log where log_time > UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 30 day))"
print
(
'*'
*
100
)
print
(
'consume kafka before jerry'
)
db
,
cursor
=
get_jerry_test
()
print
(
'connection stauts 1:'
,
db
.
open
)
db
.
close
()
db
.
ping
(
reconnect
=
True
)
print
(
'connection stauts 2:'
,
db
.
open
)
cursor
.
execute
(
sql
)
device_ids_lst
=
[
i
[
0
]
for
i
in
cursor
.
fetchall
()]
db
.
close
()
...
...
eda/smart_rank/tool.py
View file @
b3cf9c5e
...
...
@@ -362,11 +362,6 @@ def get_jerry_test():
passwd
=
"aqpuBLYzEV7tML5RPsN1pntUzFy"
,
db
=
"jerry_test"
,
charset
=
"utf8"
)
print
(
'connection stauts 1:'
,
db
.
open
)
db
.
close
()
db
.
ping
(
reconnect
=
True
)
print
(
'connection stauts 2:'
,
db
.
open
)
return
db
,
db
.
cursor
()
...
...
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