Skip to content

Commit

Permalink
deleteMessageBatch causes error #20 (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
regevbr authored Mar 18, 2019
1 parent bc5aa72 commit ae1f7a8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## Development
- nothing yet

## [v1.5.1]
### Fixed
- `deleteMessageBatch` causes error [#20](https://github.com/PruvoNet/squiss-ts/issues/20)

## [v1.5.0]
### Added
- Optionally retain s3 blobs on message delete [#16](https://github.com/PruvoNet/squiss-ts/issues/16)
Expand Down Expand Up @@ -77,3 +81,4 @@ This project adheres to [Semantic Versioning](http://semver.org/).
[v1.3.0]: https://github.com/PruvoNet/squiss-ts/compare/v1.2.4...v1.3.0
[v1.4.0]: https://github.com/PruvoNet/squiss-ts/compare/v1.3.0...v1.4.0
[v1.5.0]: https://github.com/PruvoNet/squiss-ts/compare/v1.4.0...v1.5.0
[v1.5.1]: https://github.com/PruvoNet/squiss-ts/compare/v1.5.0...v1.5.1
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "squiss-ts",
"version": "1.5.0",
"version": "1.5.1",
"description": "High-volume SQS poller",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
7 changes: 6 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,12 @@ export class Squiss extends EventEmitter {
return this.getQueueUrl().then((queueUrl) => {
return this.sqs.deleteMessageBatch({
QueueUrl: queueUrl,
Entries: batch,
Entries: batch.map((item) => {
return {
Id: item.Id,
ReceiptHandle: item.ReceiptHandle,
};
}),
}).promise();
}).then((data) => {
if (data.Failed && data.Failed.length) {
Expand Down

0 comments on commit ae1f7a8

Please sign in to comment.