iteration-cli 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/collector.js +6 -2
- package/package.json +1 -1
package/dist/collector.js
CHANGED
|
@@ -12,6 +12,10 @@ const MAX_UPLOAD_BYTES = 3 * 1024 * 1024;
|
|
|
12
12
|
const MAX_EVENT_BYTES = MAX_UPLOAD_BYTES - 1024;
|
|
13
13
|
const MAX_UPLOADS_PER_TICK = 5;
|
|
14
14
|
const MAX_REQUEST_BYTES = 4 * 1024 * 1024;
|
|
15
|
+
// Production stores some batches in about 40 seconds. Abandoning a request
|
|
16
|
+
// earlier does not stop the server, so the retry only waits behind it and the
|
|
17
|
+
// collector reports a failure for work that succeeded.
|
|
18
|
+
const UPLOAD_TIMEOUT_MS = 90_000;
|
|
15
19
|
// A tick can queue up to MAX_SCAN_BYTES_PER_TICK of new events, so scanning
|
|
16
20
|
// pauses well below the outbox capacity and resumes once uploads drain it.
|
|
17
21
|
const SCAN_PAUSE_OUTBOX_BYTES = 32 * 1024 * 1024;
|
|
@@ -182,8 +186,8 @@ async function uploadPendingOnce(config, paths, fetcher = collectorFetch, signal
|
|
|
182
186
|
},
|
|
183
187
|
body,
|
|
184
188
|
signal: signal
|
|
185
|
-
? AbortSignal.any([signal, AbortSignal.timeout(
|
|
186
|
-
: AbortSignal.timeout(
|
|
189
|
+
? AbortSignal.any([signal, AbortSignal.timeout(UPLOAD_TIMEOUT_MS)])
|
|
190
|
+
: AbortSignal.timeout(UPLOAD_TIMEOUT_MS),
|
|
187
191
|
});
|
|
188
192
|
}
|
|
189
193
|
catch (error) {
|