Change grab frequency.
This commit is contained in:
parent
5b36f594ef
commit
380ebf206a
5
run.py
5
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.")
|
||||
|
|
Loading…
Reference in New Issue