Skip to content

Commit

Permalink
Merge branch 'master' into update-doc-build-step
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwittwer authored Oct 26, 2018
2 parents 3a99899 + e334f72 commit cc94618
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,15 @@ export class BatchWriteSingleTableRequest<T> {

return this.dynamoRx.batchWriteItem(batchWriteItemInput).pipe(
tap((batchWriteManyResponse: BatchWriteItemOutput) => {
if (batchWriteManyResponse.UnprocessedItems) {
if (batchWriteManyResponse.UnprocessedItems && batchWriteManyResponse.UnprocessedItems[this.tableName]) {
this.itemsToProcess.unshift(...batchWriteManyResponse.UnprocessedItems[this.tableName])
}
}),
map((batchWriteManyResponse: BatchWriteItemOutput) => ({
remainingItems: this.itemsToProcess.length,
capacityExceeded: !!batchWriteManyResponse.UnprocessedItems,
capacityExceeded: !!(
batchWriteManyResponse.UnprocessedItems && batchWriteManyResponse.UnprocessedItems[this.tableName]
),
consumedCapacity: batchWriteManyResponse.ConsumedCapacity,
}))
)
Expand Down

0 comments on commit cc94618

Please sign in to comment.