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:
@@ -12,7 +12,7 @@ userDir = os.path.expanduser('~')
|
|||||||
conn = sqlite3.connect(userDir + '/BirdNET-Pi/scripts/birds.db')
|
conn = sqlite3.connect(userDir + '/BirdNET-Pi/scripts/birds.db')
|
||||||
df = pd.read_sql_query("SELECT * from detections", conn)
|
df = pd.read_sql_query("SELECT * from detections", conn)
|
||||||
cursor = conn.cursor()
|
cursor = conn.cursor()
|
||||||
cursor.execute('SELECT * FROM detections')
|
cursor.execute('SELECT * FROM detections WHERE Date = DATE(\'now\', \'localtime\')')
|
||||||
|
|
||||||
table_rows = cursor.fetchall()
|
table_rows = cursor.fetchall()
|
||||||
|
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ install_chart_viewer_service() {
|
|||||||
Description=BirdNET-Pi Chart Viewer Service
|
Description=BirdNET-Pi Chart Viewer Service
|
||||||
[Service]
|
[Service]
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=300
|
RestartSec=60
|
||||||
Type=simple
|
Type=simple
|
||||||
User=$USER
|
User=$USER
|
||||||
ExecStart=/usr/local/bin/daily_plot.py
|
ExecStart=/usr/local/bin/daily_plot.py
|
||||||
|
|||||||
Reference in New Issue
Block a user