diff --git a/backend/.env.test b/backend/.env.test index 1679f10f..34a1803d 100644 --- a/backend/.env.test +++ b/backend/.env.test @@ -19,4 +19,5 @@ PLAN_TRIGGER_BUCKET=test DATA_BUCKET=test EPC_AUTH_TOKEN=test ENGINE_SQS_URL=test +CATEGORISATION_SQS_URL=test ENERGY_ASSESSMENTS_BUCKET=test diff --git a/backend/app/config.py b/backend/app/config.py index f52a3606..26fb6b8b 100644 --- a/backend/app/config.py +++ b/backend/app/config.py @@ -16,6 +16,7 @@ def resolve_env_file() -> Optional[str]: if env == "local": env_file = backend_dir / ".env" + print("USING ENV FILE:", env_file) logger.debug("USING ENV FILE:", env_file) return str(env_file) @@ -36,6 +37,7 @@ class Settings(BaseSettings): DATA_BUCKET: str = "changeme" PLAN_TRIGGER_BUCKET: str ENGINE_SQS_URL: str = "changeme" + CATEGORISATION_SQS_URL: str = "changeme" # Third parties EPC_AUTH_TOKEN: str = "changeme" diff --git a/backend/app/plan/router.py b/backend/app/plan/router.py index 0e6b2aa3..1f19637a 100644 --- a/backend/app/plan/router.py +++ b/backend/app/plan/router.py @@ -70,7 +70,7 @@ async def trigger_categorisation( # Create task task_id, _ = TasksInterface.create_task( task_source="backend/plan/router.py:trigger_categorisation", - service="plan_engine", + service="plan_categorisation", inputs=payload.model_dump(), task_only=True, ) @@ -102,7 +102,7 @@ async def trigger_categorisation( batch_request.subtask_id = str(subtask_id) response = sqs_client.send_message( - QueueUrl="categorisation-queue-dev", + QueueUrl=settings.CATEGORISATION_SQS_URL, MessageBody=batch_request.model_dump_json(), )