mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-11 17:29:14 +02:00
fix: Remove auto-initialization of TrackingScraperService to fix Amazon scraper
TrackingScraperService now initializes on-demand instead of at startup. This prevents connection conflicts with AmazonScraperService and ImprovedSearchService since all services connect to the same Browserless instance. Fixes: Amazon scraper blocking issue (page too small - 2065 bytes)
This commit is contained in:
1 parent
e2a874bf6c
commit
53a05f45e4
1 file changed
+3
-4
+3
-4
@@ -151,9 +151,8 @@ async def lifespan(app: FastAPI):
|
||||
logger.info("Initializing Improved Search Service...")
|
||||
await improved_search_service.initialize()
|
||||
|
||||
# Initialize Tracking Scraper Service
|
||||
logger.info("Initializing Tracking Scraper Service...")
|
||||
await TrackingScraperService.initialize()
|
||||
# Note: TrackingScraperService is initialized on-demand (not at startup)
|
||||
# to avoid connection conflicts with other browser services
|
||||
|
||||
logger.info("Application started")
|
||||
yield
|
||||
@@ -162,7 +161,7 @@ async def lifespan(app: FastAPI):
|
||||
stop_catalog_scheduler()
|
||||
await amazon_scraper_service.shutdown()
|
||||
await improved_search_service.shutdown()
|
||||
await TrackingScraperService.shutdown()
|
||||
# TrackingScraperService shutdown is handled on-demand
|
||||
logger.info("Application shutdown complete")
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user