Closed as not planned
Closed as not planned
Description
Use case
During the implementation of the Batch utility we heavily leaned into the Powertools python implementation and create two classes AsyncBatchProcessor
and BatchProcessor
. After the refactoring in #1677 we realised that we can implement process
and processSync
functions in one class.
Solution/User Experience
Create one class with two method for async processing as default and sync processing with sync
suffix:
class BatchProcessor extends BasePartialBatchProcessor {
public async processRecord(
record: BaseRecord
): Promise<SuccessResponse | FailureResponse> {
}
/**
* Process a record with instance's handler
* @param _record Batch record to be processed
* @returns response of success or failure
*/
public processRecordSync(
_record: BaseRecord
): SuccessResponse | FailureResponse {
}
}
Alternative solutions
No response
Acknowledgment
- This feature request meets Powertools for AWS Lambda (TypeScript) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Python, Java, and .NET
Future readers
Please react with 👍 and your use case to help us understand customer demand.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Closed