1
0
Fork 0

Change grab frequency.

This commit is contained in:
Jack Hadrill 2020-01-18 23:01:23 +00:00
parent 5b36f594ef
commit 380ebf206a
1 changed files with 2 additions and 3 deletions

5
run.py
View File

@ -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.")