wip subscription org

This commit is contained in:
2025-07-23 18:10:04 -03:00
parent 3060eb5ac0
commit 9c6fa7dcbb
15 changed files with 134 additions and 231 deletions

View File

@@ -35,7 +35,7 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
# Skip if billing policy is missing or order is less than or equal to zero
if not policy or data['total'] <= 0:
logger.info('Missing billing policy.')
logger.info('Missing billing policy')
return False
logger.info(f'Billing policy from Org ID "{org_id}" found', policy=policy)
@@ -56,10 +56,9 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
with enrollment_layer.batch_writer() as batch:
for pair in result['items']:
org_id = pair['id']
batch.delete_item(
Key={
'id': {'S': f'vacancies#{org_id}'},
'id': {'S': pair['id']},
'sk': {'S': pair['sk']},
}
)