Improved logging in refresher.py
This commit is contained in:
parent
e939d67467
commit
0086cf2b4c
1 changed files with 4 additions and 0 deletions
|
|
@ -5,6 +5,8 @@ from time import sleep
|
||||||
from db_layer.capturas_interface import capturas_interface
|
from db_layer.capturas_interface import capturas_interface
|
||||||
from db_layer.capturing_tasks_interface import capturing_interface
|
from db_layer.capturing_tasks_interface import capturing_interface
|
||||||
from core.config import refresher_delay
|
from core.config import refresher_delay
|
||||||
|
from core import my_logger
|
||||||
|
import logging
|
||||||
|
|
||||||
|
|
||||||
class Refresher:
|
class Refresher:
|
||||||
|
|
@ -13,8 +15,10 @@ class Refresher:
|
||||||
while True:
|
while True:
|
||||||
sleep(refresher_delay)
|
sleep(refresher_delay)
|
||||||
|
|
||||||
|
logging.info("Checking for ads that need to be refreshed...")
|
||||||
old_ad = capturas_interface.get_old_ad()
|
old_ad = capturas_interface.get_old_ad()
|
||||||
if old_ad:
|
if old_ad:
|
||||||
|
logging.info("Found an old ad.")
|
||||||
capturing_interface.create_capturing_task(str(old_ad["referencia"]))
|
capturing_interface.create_capturing_task(str(old_ad["referencia"]))
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue