in amplify/backend/function/chimevcagentassist76fdc921/src/index.js [17:27]
function waitOnComplete(waitBetweenChecksMillis, f) {
let intervalHandle = setInterval(function() {
if (pendingCount == 0) {
clearInterval(intervalHandle);
console.log(`waitOnComplete: pendingCount is ${pendingCount}; calling handler ...`);
f.call();
} else {
console.log(`waitOnComplete: pendingCount is ${pendingCount}; waiting ...`);
}
}, waitBetweenChecksMillis);
}