codemem 0.30.0-alpha.4 → 0.30.0
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/index.js +10 -11
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -3200,28 +3200,27 @@ function createSequentialBackfillCoordinator(store, jobPlans, options) {
|
|
|
3200
3200
|
};
|
|
3201
3201
|
const waitForCurrentJob = () => {
|
|
3202
3202
|
if (stopped || options.signal?.aborted || !activePlan || !activeRunner) return;
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
const
|
|
3206
|
-
const finishedRunner = activeRunner;
|
|
3203
|
+
if (getMaintenanceJob(store.db, activePlan.kind)?.status === "failed") {
|
|
3204
|
+
const failedPlan = activePlan;
|
|
3205
|
+
const failedRunner = activeRunner;
|
|
3207
3206
|
activePlan = null;
|
|
3208
3207
|
activeRunner = null;
|
|
3209
|
-
|
|
3208
|
+
failedRunner.stop().finally(() => {
|
|
3210
3209
|
if (!stopped && !options.signal?.aborted) {
|
|
3211
|
-
options.logger.
|
|
3210
|
+
options.logger.warn(`${failedPlan.name} backfill failed and will be retried on a later startup`);
|
|
3212
3211
|
startNextJob();
|
|
3213
3212
|
}
|
|
3214
3213
|
});
|
|
3215
3214
|
return;
|
|
3216
3215
|
}
|
|
3217
|
-
if (
|
|
3218
|
-
const
|
|
3219
|
-
const
|
|
3216
|
+
if (!activePlan.isPending(store.db)) {
|
|
3217
|
+
const finishedPlan = activePlan;
|
|
3218
|
+
const finishedRunner = activeRunner;
|
|
3220
3219
|
activePlan = null;
|
|
3221
3220
|
activeRunner = null;
|
|
3222
|
-
|
|
3221
|
+
finishedRunner.stop().finally(() => {
|
|
3223
3222
|
if (!stopped && !options.signal?.aborted) {
|
|
3224
|
-
options.logger.
|
|
3223
|
+
options.logger.step(`${finishedPlan.name} backfill complete`);
|
|
3225
3224
|
startNextJob();
|
|
3226
3225
|
}
|
|
3227
3226
|
});
|