From 380ebf206af457a95134936bf3857cd126d74cc6 Mon Sep 17 00:00:00 2001 From: Jack Hadrill Date: Sat, 18 Jan 2020 23:01:23 +0000 Subject: [PATCH] Change grab frequency. --- run.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/run.py b/run.py index ffee99b..52555df 100644 --- a/run.py +++ b/run.py @@ -23,8 +23,7 @@ from sources.TheEconomistTechnology import TheEconomistTechnology from sources.Wired import Wired DATABASE_PATH = Path("storage.db") -GRAB_FREQUENCY = 15 -GRAB_INTERVAL = 5 +GRAB_FREQUENCY = 60 def main(): @@ -58,7 +57,7 @@ def main(): while True: for grabber in grabbers: grabber.grab() - time.sleep(GRAB_FREQUENCY/GRAB_INTERVAL) + time.sleep(GRAB_FREQUENCY/len(grabbers)) except sqlite3.Error: logging.error("Could not connect to database.")