Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 301a309

Browse files
authoredJun 23, 2020
Update reconsiler-dd.js
1 parent 8ebb9f5 commit 301a309

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎src/reconsiler-dd.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ async function onScan(err, data) {
4646
} else {
4747
try {
4848
console.log("Scan succeeded.");
49-
data.Items.forEach(async function (item) {
49+
await Promise.all(data.Items.map(async (items) => {
50+
// data.Items.forEach(async function (item) {
5051
//console.log(item.payloadseqid);
5152
let retval;
5253
try {
@@ -68,7 +69,7 @@ async function onScan(err, data) {
6869
logger.info(`Reconsiler2 Posted Payload : ${JSON.stringify(item.pl_document)}`)
6970
}
7071
logger.info(`after retval condition`)
71-
});
72+
}));
7273
if (typeof data.LastEvaluatedKey != "undefined") {
7374
console.log("Scanning for more...");
7475
// logger.info(`params.ExclusiveStartKey : ${params.ExclusiveStartKey}`)

0 commit comments

Comments
 (0)
Please sign in to comment.