mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
fix local invoker
This commit is contained in:
parent
3df726937e
commit
04df924146
2 changed files with 5 additions and 3 deletions
|
|
@ -20,7 +20,9 @@ def handler(body: dict[str, Any], context: Any) -> str:
|
|||
api_key=settings.MAGICPLAN_API_KEY,
|
||||
)
|
||||
# TODO: read s3_bucket from env var so staging/prod use the correct bucket
|
||||
plan: Plan = MagicPlanService(client, s3_bucket="retrofit-energy-assessments-dev").run(payload)
|
||||
plan: Plan = MagicPlanService(
|
||||
client, s3_bucket="retrofit-energy-assessments-dev"
|
||||
).run(payload)
|
||||
logger.info("Saved MagicPlan plan uid=%s", plan.uid)
|
||||
return plan.uid
|
||||
|
||||
|
|
@ -30,7 +32,6 @@ if __name__ == "__main__":
|
|||
"Records": [
|
||||
{
|
||||
"body": '{"address": "2 Laburnum Way Bromley BR2 8BZ", "hubspot_deal_id": "local-test-deal"}',
|
||||
"messageId": "local-test",
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,13 +10,14 @@ LAMBDA_URL = f"http://{HOST}:{PORT}/2015-03-31/functions/function/invocations"
|
|||
payload = {
|
||||
"Records": [
|
||||
{
|
||||
"messageId": "test-message-id",
|
||||
"body": json.dumps(
|
||||
# {
|
||||
# "address": "2 Laburnum Way, Rombley, BR2 8BZ | Retrofit Assessment",
|
||||
# "hubspot_deal_id": "500262906061",
|
||||
# }
|
||||
{"address": "33 Wallaby Way, Sydney", "hubspot_deal_id": "123456789"}
|
||||
)
|
||||
),
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue