File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
templates/javascript/clients/client/api Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ async chunkedPush(
2424): Promise<Array <WatchResponse >> {
2525 let records: Array< PushTaskRecords> = [];
2626 const responses: Array< WatchResponse> = [];
27+ const waitBatchSize = Math.floor(batchSize / 10);
2728
2829 const objectEntries = objects.entries();
2930 for (const [i, obj] of objectEntries) {
@@ -35,8 +36,8 @@ async chunkedPush(
3536 records = [];
3637 }
3738
38- if (waitForTasks && (responses.length % 50 === 0 || i === objects.length - 1)) {
39- for (const resp of responses.slice(-50 )) {
39+ if (waitForTasks && (responses.length % waitBatchSize === 0 || i === objects.length - 1)) {
40+ for (const resp of responses.slice(-waitBatchSize )) {
4041 if (! resp.eventID) {
4142 throw new Error(' received unexpected response from the push endpoint, eventID must not be undefined' );
4243 }
You can’t perform that action at this time.
0 commit comments