update
This commit is contained in:
@@ -13,7 +13,7 @@ from layercake.dynamodb import (
|
||||
)
|
||||
|
||||
from boto3clients import dynamodb_client
|
||||
from conf import ORDER_TABLE, USER_TABLE
|
||||
from config import ORDER_TABLE, USER_TABLE
|
||||
|
||||
logger = Logger(__name__)
|
||||
user_layer = DynamoDBPersistenceLayer(USER_TABLE, dynamodb_client)
|
||||
@@ -39,7 +39,7 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
|
||||
flatten_top=False,
|
||||
)
|
||||
|
||||
# Sometimes, a DynamoDB insertion may take longer to complete,
|
||||
# Sometimes the function executes before the user insertion completes,
|
||||
# so an exception is raised to trigger a retry.
|
||||
if len(ids) < 2:
|
||||
raise ValueError('IDs not found.')
|
||||
|
||||
Reference in New Issue
Block a user