mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
commit
577dc72c4b
1 changed files with 12 additions and 3 deletions
|
|
@ -10,16 +10,25 @@
|
||||||
from etl.hubspot.hubspotClient import HubspotClient
|
from etl.hubspot.hubspotClient import HubspotClient
|
||||||
from etl.hubspot.hubspotDataTodB import HubspotDataToDb
|
from etl.hubspot.hubspotDataTodB import HubspotDataToDb
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
import json
|
||||||
|
|
||||||
|
|
||||||
# @subtask_handler() TODO: Do this without subtask_handler but task_handler() that creates task_id and subtask_id
|
# @subtask_handler() TODO: Do this without subtask_handler but task_handler() that creates task_id and subtask_id
|
||||||
def handler(event: dict[str, Any], context: Any, local: bool = False) -> None:
|
def handler(event: dict[str, Any], context: Any, local: bool = False) -> None:
|
||||||
if local is True:
|
if local is True:
|
||||||
body = {
|
event = {
|
||||||
"hubspot_deal_id": "409487859944",
|
"Records": [
|
||||||
|
{
|
||||||
|
"body": json.dumps(
|
||||||
|
{
|
||||||
|
"hubspot_deal_id": "409487859944",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
body = event["Records"][0]["body"]
|
body = json.loads(event["Records"][0]["body"])
|
||||||
hubspot_deal_id = body.get("hubspot_deal_id", "")
|
hubspot_deal_id = body.get("hubspot_deal_id", "")
|
||||||
|
|
||||||
if hubspot_deal_id == "":
|
if hubspot_deal_id == "":
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue