Merge pull request #1208 from Hestia-Homes/bug/audit-generator-task-orchestrator

Pass unused TaskOrchestrator to audit generator handler to avoid TypeError
This commit is contained in:
Daniel Roth 2026-06-10 10:36:18 +01:00 committed by GitHub
commit 3ceafe8b49
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,13 +13,19 @@ from infrastructure.postgres.engine import make_engine, make_session
from infrastructure.s3.s3_client import S3Client
from orchestration.audit_generator_orchestrator import AuditGeneratorOrchestrator
from orchestration.audit_generator_unit_of_work import AuditGeneratorUnitOfWork
from orchestration.task_orchestrator import TaskOrchestrator
from utilities.aws_lambda.subtask_handler import subtask_handler
@subtask_handler()
def handler(body: dict[str, Any], context: Any) -> None:
def handler(
body: dict[str, Any], context: Any, task_orchestrator: TaskOrchestrator
) -> None:
trigger = AuditGeneratorTriggerRequest.model_validate(body)
boto3_client: Any = boto3.client # pyright: ignore[reportUnknownMemberType, reportUnknownVariableType]
boto3_client: Any = (
boto3.client
) # pyright: ignore[reportUnknownMemberType, reportUnknownVariableType]
boto_s3: Any = boto3_client("s3")
bucket = os.environ["S3_BUCKET_NAME"]
s3_client = S3Client(boto_s3_client=boto_s3, bucket=bucket)