reenroll when failed
This commit is contained in:
@@ -9,9 +9,7 @@ from aws_lambda_powertools.utilities.typing import LambdaContext
|
||||
from layercake.dynamodb import DynamoDBPersistenceLayer, SortKey, TransactKey
|
||||
|
||||
from boto3clients import dynamodb_client
|
||||
from config import (
|
||||
ENROLLMENT_TABLE,
|
||||
)
|
||||
from config import ENROLLMENT_TABLE
|
||||
from enrollment import LinkedEntity, enroll
|
||||
from schemas import Course, Enrollment, User
|
||||
|
||||
@@ -46,6 +44,7 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
|
||||
|
||||
return enroll(
|
||||
enrollment,
|
||||
org=metadata.get('org', None),
|
||||
subscription=subscription,
|
||||
deduplication_window={'offset_days': metadata['dedup_window_offset_days']},
|
||||
linked_entities=frozenset({LinkedEntity(new_image['id'], 'ENROLLMENT')}),
|
||||
|
||||
Reference in New Issue
Block a user