Skip to content

Commit

Permalink
remove some logs
Browse files Browse the repository at this point in the history
  • Loading branch information
mevljas committed Feb 8, 2025
1 parent a3abf20 commit 801b924
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async def setup_db(database_path: str):
:param database_path: str
:return:
"""
logger.info("DB setup started.")
logger.debug("DB setup started.")

# Delete existing database if it exists.
if os.path.exists(database_path):
Expand Down
6 changes: 3 additions & 3 deletions spider/spider.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async def run_spider(database_manager: DatabaseManager) -> tuple[dict, bool]:

# For each url, send the results to a different channel.
for channel, page_url in config:
logger.info("Processing channel %s with URL %s", channel, page_url)
logger.debug("Processing channel %s with URL %s", channel, page_url)

# create a new page inside context.
browser_page = await browser.new_page(
Expand Down Expand Up @@ -85,7 +85,7 @@ async def run_spider(database_manager: DatabaseManager) -> tuple[dict, bool]:
listing_id, old_prices = saved_results[nepremicnine_id]

if old_prices[-1] != new_price:
logger.info("New saved_price detected for %s.", nepremicnine_id)
logger.debug("New saved_price detected for %s.", nepremicnine_id)
await database_manager.add_new_price(
listing_id=listing_id,
current_price=new_price,
Expand All @@ -107,7 +107,7 @@ async def run_spider(database_manager: DatabaseManager) -> tuple[dict, bool]:
continue

# We found a new listing.
logger.info("New listing found %s.", nepremicnine_id)
logger.debug("New listing found %s.", nepremicnine_id)

await database_manager.save_listing(nepremicnine_id, new_data)

Expand Down

0 comments on commit 801b924

Please sign in to comment.