mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
even more logs
This commit is contained in:
parent
8325bb53cf
commit
94524379e4
1 changed files with 7 additions and 0 deletions
|
|
@ -203,14 +203,21 @@ def handler(event, context):
|
||||||
|
|
||||||
for record in records:
|
for record in records:
|
||||||
print("Processing record...")
|
print("Processing record...")
|
||||||
|
print(f"Record type: {type(record)}")
|
||||||
|
print(f"Record: {record}")
|
||||||
task_id = None
|
task_id = None
|
||||||
subtask_id = None
|
subtask_id = None
|
||||||
try:
|
try:
|
||||||
# Parse body
|
# Parse body
|
||||||
print("Parsing body from record...")
|
print("Parsing body from record...")
|
||||||
|
print(f"record.get('body'): {record.get('body')}")
|
||||||
|
print(f"isinstance(record.get('body'), str): {isinstance(record.get('body'), str)}")
|
||||||
|
|
||||||
if isinstance(record.get("body"), str):
|
if isinstance(record.get("body"), str):
|
||||||
|
print("Body is string, parsing JSON...")
|
||||||
body = json.loads(record["body"])
|
body = json.loads(record["body"])
|
||||||
else:
|
else:
|
||||||
|
print("Body is not string, using directly...")
|
||||||
body = record.get("body", {})
|
body = record.get("body", {})
|
||||||
print(f"Body parsed: {body}")
|
print(f"Body parsed: {body}")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue