daily_plot has a better call to the database

and updates every 60 seconds instead of 5 minutes
as it takes about 13 seconds and doesn't seem to
bother things
This commit is contained in:
mcguirepr89
2022-04-16 11:49:58 -04:00
parent df9f00218f
commit 0a9ee65a2b
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ userDir = os.path.expanduser('~')
conn = sqlite3.connect(userDir + '/BirdNET-Pi/scripts/birds.db')
df = pd.read_sql_query("SELECT * from detections", conn)
cursor = conn.cursor()
cursor.execute('SELECT * FROM detections')
cursor.execute('SELECT * FROM detections WHERE Date = DATE(\'now\', \'localtime\')')
table_rows = cursor.fetchall()