summaryrefslogtreecommitdiff
path: root/data_collector.py
diff options
context:
space:
mode:
authorA Farzat <a@farzat.xyz>2025-10-11 09:15:07 +0300
committerA Farzat <a@farzat.xyz>2025-10-11 09:15:07 +0300
commit3145e87a434552fdf93a17a995c0f5bd68e8aa24 (patch)
treedae29008ccb03a1b47f5474346639e81b7273852 /data_collector.py
parent5bbd9bda00e861f72f42965d407ada3ea6f5760e (diff)
downloadcsca5028-3145e87a434552fdf93a17a995c0f5bd68e8aa24.tar.gz
csca5028-3145e87a434552fdf93a17a995c0f5bd68e8aa24.zip
Organize data_collector to be similar to data_analyser
Diffstat (limited to 'data_collector.py')
-rwxr-xr-xdata_collector.py13
1 files changed, 0 insertions, 13 deletions
diff --git a/data_collector.py b/data_collector.py
deleted file mode 100755
index 485d8af..0000000
--- a/data_collector.py
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env python
-
-from time import sleep
-from datetime import datetime, timedelta, UTC
-from components.database import subscriptions
-from components.subscriptions.main import Subscription
-
-while True:
- for sub_dict in subscriptions.find():
- sub = Subscription(**sub_dict)
- if datetime.now(tz=UTC) - sub.last_fetch > timedelta(seconds=sub.time_between_fetches):
- sub.fetch()
- sleep(60)