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
76c111ee
Commit
76c111ee
authored
Aug 31, 2018
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加捕捉异常
parent
aaf2c17d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
5 deletions
+15
-5
diaryUpdateOnlineOffline.py
diaryUpdateOnlineOffline.py
+11
-4
readme.txt
readme.txt
+3
-0
userProfile.py
userProfile.py
+1
-1
No files found.
diaryUpdateOnlineOffline.py
View file @
76c111ee
...
...
@@ -24,12 +24,19 @@ def get_video_id(cache_video_id):
db
=
pymysql
.
connect
(
host
=
LOCAL_EAGLE_HOST
,
port
=
4000
,
user
=
'root'
,
db
=
'eagle'
)
cursor
=
db
.
cursor
()
sql
=
"select diary_id from feed_diary_boost;"
cursor
.
execute
(
sql
)
result
=
cursor
.
fetchall
()
df
=
pd
.
DataFrame
(
list
(
result
))
try
:
cursor
.
execute
(
sql
)
result
=
cursor
.
fetchall
()
df
=
pd
.
DataFrame
(
list
(
result
))
except
Exception
:
print
(
"发生异常"
,
Exception
)
df
=
pd
.
DataFrame
()
finally
:
db
.
close
()
print
(
"videio_id 预览"
)
print
(
df
.
head
(
1
))
db
.
close
()
if
df
.
empty
:
return
cache_video_id
else
:
...
...
readme.txt
View file @
76c111ee
...
...
@@ -15,6 +15,9 @@ pip install redis
pip install numpy
sudo apt-get install python3-dev
pip install pandas
pip install datetime
pip install git+https://github.com/Supervisor/supervisor
问题:
#安装pandas出错:Python.h: No such file or directory
...
...
userProfile.py
View file @
76c111ee
...
...
@@ -29,7 +29,7 @@ def get_active_users(flag,path,differ):
df
=
con_sql
(
sql
)
else
:
db
=
pymysql
.
connect
(
host
=
'192.168.15.12'
,
port
=
4000
,
user
=
'root'
,
db
=
'jerry_test'
)
#
sql = "select device_id,city_id from user_active_time"
sql
=
"select device_id,city_id from user_active_time"
cursor
=
db
.
cursor
()
cursor
.
execute
(
sql
)
result
=
cursor
.
fetchall
()
...
...
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