From 4b895e3e3f196885e395188a376b4d1bd6fb60d6 Mon Sep 17 00:00:00 2001 From: ferdzo Date: Thu, 10 Oct 2024 00:13:27 +0200 Subject: [PATCH] Update small --- .gitignore | 1 + iotDashboard/tasks.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index bbab3de..b3c90c0 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ db.sqlite3 demo.db demo.db-shm demo.db-wal +__pycache__/ diff --git a/iotDashboard/tasks.py b/iotDashboard/tasks.py index 459d904..44e29ab 100644 --- a/iotDashboard/tasks.py +++ b/iotDashboard/tasks.py @@ -105,7 +105,7 @@ def insert_data(data, sensor_type): except Exception as e: print(f"Failed to insert data: {e}") -@periodic_task(crontab(minute='*/1')) +@periodi c_task(crontab(minute='*/1')) def fetch_data_from_all_devices(): """Fetch and insert data for all devices based on their protocol.""" devices = Device.objects.all()