File tree 2 files changed +4
-6
lines changed
examples/batch_processing/src
2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ You can create your own partial batch processor from scratch by inheriting the `
346
346
347
347
You can then use this class as a context manager, or pass it to ` batch_processor ` to use as a decorator on your Lambda handler function.
348
348
349
- ``` python hl_lines="9-12 20 35 41 48 59 64 68 76 " title="Creating a custom batch processor"
349
+ ``` python hl_lines="9-11 19 33 39 46 57 62 66 74 " title="Creating a custom batch processor"
350
350
-- 8 < -- " examples/batch_processing/src/custom_partial_processor.py"
351
351
```
352
352
Original file line number Diff line number Diff line change 7
7
8
8
from aws_lambda_powertools import Logger
9
9
from aws_lambda_powertools .utilities .batch import (
10
- BasePartialBatchProcessor ,
11
- EventType ,
10
+ BasePartialProcessor ,
12
11
process_partial_response ,
13
12
)
14
13
17
16
logger = Logger ()
18
17
19
18
20
- class MyPartialProcessor (BasePartialBatchProcessor ):
19
+ class MyPartialProcessor (BasePartialProcessor ):
21
20
"""
22
21
Process a record and stores successful results at a Amazon DynamoDB Table
23
22
@@ -29,8 +28,7 @@ class MyPartialProcessor(BasePartialBatchProcessor):
29
28
30
29
def __init__ (self , table_name : str ):
31
30
self .table_name = table_name
32
-
33
- super ().__init__ (event_type = EventType .SQS )
31
+ super ().__init__ ()
34
32
35
33
def _prepare (self ):
36
34
# It's called once, *before* processing
You can’t perform that action at this time.
0 commit comments