Skip to content

Commit

Permalink
docs(batch): remove legacy reference to sqs processor
Browse files Browse the repository at this point in the history
  • Loading branch information
heitorlessa committed Oct 21, 2022
1 parent a72ab86 commit 880c696
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions docs/utilities/batch.md
Original file line number Diff line number Diff line change
Expand Up @@ -1207,28 +1207,3 @@ class MyProcessor(BatchProcessor):
capture_exception() # send exception to Sentry
return super().failure_handler(record, exception)
```

### Suppressing exceptions

If you want to disable the default behavior where `BatchProcessingError` is raised if there are any errors, you can pass the `suppress_exception` boolean argument.

=== "Decorator"

```python hl_lines="3"
from aws_lambda_powertools.utilities.batch import batch_processor

@batch_processor(record_handler=record_handler, suppress_exception=True)
def lambda_handler(event, context):
return {"statusCode": 200}
```

=== "Context manager"

```python hl_lines="3"
from aws_lambda_powertools.utilities.batch import BatchProcessor, EventType

processor = BatchProcessor(event_type=EventType.SQS, suppress_exception=True)

with processor(records, record_handler):
result = processor.process()
```

0 comments on commit 880c696

Please sign in to comment.