thonguyen511 commited on
Commit
24e7df9
·
1 Parent(s): 6c28794

chore: update background scraper loop interval to 5 minutes

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -27,12 +27,12 @@ async def background_scraper_loop():
27
  # Crypto scraper is synchronous, so we run it in a thread to prevent blocking
28
  await asyncio.to_thread(scrape_crypto.run)
29
 
30
- logger.info("Scraping cycle complete. Sleeping for 10 minutes.")
31
  except Exception as e:
32
  logger.error(f"Error during scraping cycle: {e}")
33
 
34
- # Sleep for 10 minutes (600 seconds)
35
- await asyncio.sleep(600)
36
 
37
  @asynccontextmanager
38
  async def lifespan(app: FastAPI):
 
27
  # Crypto scraper is synchronous, so we run it in a thread to prevent blocking
28
  await asyncio.to_thread(scrape_crypto.run)
29
 
30
+ logger.info("Scraping cycle complete. Sleeping for 5 minutes.")
31
  except Exception as e:
32
  logger.error(f"Error during scraping cycle: {e}")
33
 
34
+ # Sleep for 5 minutes (300 seconds)
35
+ await asyncio.sleep(300)
36
 
37
  @asynccontextmanager
38
  async def lifespan(app: FastAPI):