Initial commit - WhyRating Engine (Google Reviews Scraper)

This commit is contained in:
Alejandro Gutiérrez
2026-02-02 18:19:00 +00:00
parent 0543a08242
commit 2206ddeff2
136 changed files with 51138 additions and 855 deletions

View File

@@ -277,15 +277,17 @@ async def execute_pipeline(
pipeline = await _get_pipeline_instance(pipeline_id)
# Create execution record
execution_id = str(uuid.uuid4())
# Prepare input data
input_data = request.input_data or {}
if request.job_id:
input_data["job_id"] = request.job_id
if request.business_id:
input_data["business_id"] = request.business_id
# Create execution record
execution_id = str(uuid.uuid4())
# Pass execution_id so Stage 5 synthesis can store results
input_data["execution_id"] = execution_id
stages = request.stages or pipeline.get_stage_names()
# Prepare input summary for storage
@@ -604,6 +606,7 @@ async def get_widget_data(
pipeline_id: str,
widget_id: str,
business_id: str | None = Query(None, description="Filter by business"),
job_id: str | None = Query(None, description="Filter by job ID"),
time_range: str = Query("30d", description="Time range (e.g., 7d, 30d, 90d)"),
page: int = Query(1, ge=1, description="Page number for paginated widgets"),
page_size: int = Query(10, ge=1, le=100, description="Items per page"),
@@ -621,6 +624,7 @@ async def get_widget_data(
try:
params = {
"business_id": business_id,
"job_id": job_id,
"time_range": time_range,
"page": page,
"page_size": page_size,