add event

This commit is contained in:
2025-07-05 15:02:28 -03:00
parent 208c43f398
commit 0df4d7aa71
9 changed files with 96 additions and 51 deletions

View File

@@ -43,6 +43,8 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
if len(ids) < 2:
raise ValueError('IDs not found.')
logger.info('IDs found', ids=ids)
with order_layer.transact_writer() as transact:
transact.update(
key=KeyPair(new_image['id'], '0'),
@@ -63,14 +65,4 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
},
)
# Post-migration: remove the following line
transact.put(
item={
'id': new_image['id'],
'sk': 'metadata#tenant',
'tenant_id': f'ORG#{ids["org_id"]}',
'create_date': now_,
}
)
return True