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(
24
24
): Promise<Array <WatchResponse >> {
25
25
let records: Array< PushTaskRecords> = [];
26
26
const responses: Array< WatchResponse> = [];
27
+ const waitBatchSize = Math.floor(batchSize / 10);
27
28
28
29
const objectEntries = objects.entries();
29
30
for (const [i, obj] of objectEntries) {
@@ -35,8 +36,8 @@ async chunkedPush(
35
36
records = [];
36
37
}
37
38
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 )) {
40
41
if (! resp.eventID) {
41
42
throw new Error(' received unexpected response from the push endpoint, eventID must not be undefined' );
42
43
}
You can’t perform that action at this time.
0 commit comments