mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
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:
commit
3ceafe8b49
1 changed files with 8 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue