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
889ab4b9
Commit
889ab4b9
authored
Sep 01, 2018
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add print
parent
71878470
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
diaryUpdateOnlineOffline.py
diaryUpdateOnlineOffline.py
+3
-1
No files found.
diaryUpdateOnlineOffline.py
View file @
889ab4b9
...
@@ -219,11 +219,12 @@ def get_queue(device_id, city_id,queue_name):
...
@@ -219,11 +219,12 @@ def get_queue(device_id, city_id,queue_name):
else
:
else
:
db
=
pymysql
.
connect
(
host
=
LOCAL_HOST
,
port
=
3306
,
user
=
'work'
,
db
=
pymysql
.
connect
(
host
=
LOCAL_HOST
,
port
=
3306
,
user
=
'work'
,
passwd
=
'workwork'
,
db
=
'doris_test'
)
passwd
=
'workwork'
,
db
=
'doris_test'
)
print
(
1
)
cursor
=
db
.
cursor
()
cursor
=
db
.
cursor
()
sql
=
"select {} from device_diary_queue "
\
sql
=
"select {} from device_diary_queue "
\
"where device_id = '{}' and city_id = '{}';"
.
format
(
queue_name
,
device_id
,
city_id
)
"where device_id = '{}' and city_id = '{}';"
.
format
(
queue_name
,
device_id
,
city_id
)
cursor
.
execute
(
sql
)
cursor
.
execute
(
sql
)
print
(
2
)
result
=
cursor
.
fetchall
()
result
=
cursor
.
fetchall
()
df
=
pd
.
DataFrame
(
list
(
result
))
df
=
pd
.
DataFrame
(
list
(
result
))
print
(
"multi"
)
print
(
"multi"
)
...
@@ -253,6 +254,7 @@ def pipe_line(queue_name, queue_arg, device_id,total_video_id):
...
@@ -253,6 +254,7 @@ def pipe_line(queue_name, queue_arg, device_id,total_video_id):
def
user_update
(
device_id
,
city_id
,
queue_name
,
data_set_cid
,
total_video_id
):
def
user_update
(
device_id
,
city_id
,
queue_name
,
data_set_cid
,
total_video_id
):
print
(
0
)
queue_list
=
get_queue
(
device_id
,
city_id
,
queue_name
)
queue_list
=
get_queue
(
device_id
,
city_id
,
queue_name
)
if
queue_list
:
if
queue_list
:
queue_predict
=
list
(
set
(
queue_list
)
&
set
(
data_set_cid
))
queue_predict
=
list
(
set
(
queue_list
)
&
set
(
data_set_cid
))
...
...
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