update
This commit is contained in:
@@ -49,6 +49,7 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool | No
|
|||||||
'sk': f'MONTH#{report_sk}',
|
'sk': f'MONTH#{report_sk}',
|
||||||
'status': 'PENDING',
|
'status': 'PENDING',
|
||||||
'target_month': target_month,
|
'target_month': target_month,
|
||||||
|
'created_at': now_,
|
||||||
},
|
},
|
||||||
cond_expr='attribute_not_exists(sk)',
|
cond_expr='attribute_not_exists(sk)',
|
||||||
exc_cls=ReportingConflictError,
|
exc_cls=ReportingConflictError,
|
||||||
@@ -59,6 +60,7 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool | No
|
|||||||
'sk': f'MONTH#{report_sk}#SCHEDULE#SEND_REPORT_EMAIL',
|
'sk': f'MONTH#{report_sk}#SCHEDULE#SEND_REPORT_EMAIL',
|
||||||
'target_month': target_month,
|
'target_month': target_month,
|
||||||
'ttl': ttl(start_dt=report_month),
|
'ttl': ttl(start_dt=report_month),
|
||||||
|
'created_at': now_,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
|
|||||||
|
|
||||||
# Add enrollment entry to billing
|
# Add enrollment entry to billing
|
||||||
try:
|
try:
|
||||||
canceled_by = enrollment.get('author')
|
created_by = enrollment.get('author')
|
||||||
course_id = enrollment['course']['id']
|
course_id = enrollment['course']['id']
|
||||||
course = course_layer.collection.get_items(
|
course = course_layer.collection.get_items(
|
||||||
KeyPair(
|
KeyPair(
|
||||||
@@ -125,15 +125,15 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
|
|||||||
'enrolled_at': enrollment['created_at'],
|
'enrolled_at': enrollment['created_at'],
|
||||||
'created_at': now_,
|
'created_at': now_,
|
||||||
}
|
}
|
||||||
# Add canceled_by if present
|
# Add created_by if present
|
||||||
| (
|
| (
|
||||||
{
|
{
|
||||||
'author': {
|
'author': {
|
||||||
'id': canceled_by['user_id'],
|
'id': created_by['user_id'],
|
||||||
'name': canceled_by['name'],
|
'name': created_by['name'],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if canceled_by
|
if created_by
|
||||||
else {}
|
else {}
|
||||||
),
|
),
|
||||||
cond_expr='attribute_not_exists(sk)',
|
cond_expr='attribute_not_exists(sk)',
|
||||||
@@ -145,7 +145,7 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
|
|||||||
),
|
),
|
||||||
table_name=ENROLLMENT_TABLE,
|
table_name=ENROLLMENT_TABLE,
|
||||||
update_expr='SET billing_period = :billing_period, \
|
update_expr='SET billing_period = :billing_period, \
|
||||||
updated_at = :updated_at',
|
updated_at = :updated_at',
|
||||||
expr_attr_values={
|
expr_attr_values={
|
||||||
':billing_period': sk,
|
':billing_period': sk,
|
||||||
':updated_at': now_,
|
':updated_at': now_,
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
|
|||||||
f'vacancies#{org_id}',
|
f'vacancies#{org_id}',
|
||||||
new_image['id'],
|
new_image['id'],
|
||||||
),
|
),
|
||||||
limit=100,
|
limit=150,
|
||||||
)
|
)
|
||||||
|
|
||||||
logger.info(
|
logger.info(
|
||||||
|
|||||||
Reference in New Issue
Block a user