@kradle/cli 0.0.15 → 0.0.16
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const DEFAULT_MAX_CONCURRENT = 5;
|
|
2
|
-
const RATE_LIMIT_BACKOFF_MS =
|
|
2
|
+
const RATE_LIMIT_BACKOFF_MS = 15000;
|
|
3
3
|
const STATUS_POLL_INTERVAL_MS = 2000;
|
|
4
4
|
export class Runner {
|
|
5
5
|
runs;
|
|
@@ -135,7 +135,13 @@ export class Runner {
|
|
|
135
135
|
/**
|
|
136
136
|
* Start a single run
|
|
137
137
|
*/
|
|
138
|
-
async startRun(index) {
|
|
138
|
+
async startRun(index, tries = 0) {
|
|
139
|
+
if (tries > 5) {
|
|
140
|
+
this.updateState(index, { status: "error", error: "Failed to start run after 3 tries" });
|
|
141
|
+
this.completedRuns.add(index);
|
|
142
|
+
this.activeRuns.delete(index);
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
139
145
|
const state = this.states[index];
|
|
140
146
|
this.activeRuns.add(index);
|
|
141
147
|
this.updateState(index, { status: "initializing", startTime: Date.now() });
|
|
@@ -165,6 +171,7 @@ export class Runner {
|
|
|
165
171
|
this.updateState(index, { status: "queued", error: undefined });
|
|
166
172
|
this.activeRuns.delete(index);
|
|
167
173
|
await this.delay(RATE_LIMIT_BACKOFF_MS);
|
|
174
|
+
await this.startRun(index, tries + 1);
|
|
168
175
|
return;
|
|
169
176
|
}
|
|
170
177
|
this.updateState(index, { status: "error", error: errorMessage });
|
package/oclif.manifest.json
CHANGED