Feature request: implement BasePartialBatchProcessor
class
#1586
Labels
batch
This item relates to the Batch Processing Utility
completed
This item is complete and has been merged/shipped
feature-request
This item refers to a feature request for an existing or new utility
Milestone
Use Case
The Python version of Powertools for AWS features a classes called
BasePartialBatchProcessor
andBatchProcessor
, and its respective interfaces. These class is used to provide a Batch Processor utility in Powertools.Solution/User Experience
Refer to the implementation found here, and specifically to the
BasePartialBatchProcessor
class andBasePartialProcessor
interface.Refer to the implementation found here, and specifically to the
BatchProcessor
class.Acceptance criteria
Notes
The reference implementation also implements an
AsyncBatchProcessor
and both classes have_process_record
and_async_process_record
methods.I'd like to dedicate some time investigating whether we can merge these two classes & methods into a single one.
The ideal DX would have the customer simply importing
BatchProcessor
and passing it a function reference when callingprocess_partial_response
. The utility should be smart enough to understand whether the function passed is synchronous or asynchronous and handle it accordingly (i.e. if it's async, thenawait
the record handler).If this is not possible, or too complex / unreliable, or the resulting types are confusing or overly broad, then let's stick with two separate entities.
The text was updated successfully, but these errors were encountered: