@hatk/hatk 0.0.1-alpha.17 → 0.0.1-alpha.18
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/backfill.d.ts +1 -1
- package/dist/backfill.d.ts.map +1 -1
- package/dist/backfill.js +2 -1
- package/dist/main.js +8 -6
- package/package.json +1 -1
package/dist/backfill.d.ts
CHANGED
|
@@ -65,6 +65,6 @@ export declare function backfillRepo(did: string, collections: Set<string>, fetc
|
|
|
65
65
|
* })
|
|
66
66
|
* ```
|
|
67
67
|
*/
|
|
68
|
-
export declare function runBackfill(opts: BackfillOpts): Promise<
|
|
68
|
+
export declare function runBackfill(opts: BackfillOpts): Promise<number>;
|
|
69
69
|
export {};
|
|
70
70
|
//# sourceMappingURL=backfill.d.ts.map
|
package/dist/backfill.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backfill.d.ts","sourceRoot":"","sources":["../src/backfill.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEjD,6CAA6C;AAC7C,UAAU,YAAY;IACpB,wFAAwF;IACxF,MAAM,EAAE,MAAM,CAAA;IACd,8FAA8F;IAC9F,MAAM,EAAE,MAAM,CAAA;IACd,yEAAyE;IACzE,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACxB,qDAAqD;IACrD,MAAM,EAAE,cAAc,CAAA;CACvB;AAuGD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAsJ/G;AAgCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"backfill.d.ts","sourceRoot":"","sources":["../src/backfill.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEjD,6CAA6C;AAC7C,UAAU,YAAY;IACpB,wFAAwF;IACxF,MAAM,EAAE,MAAM,CAAA;IACd,8FAA8F;IAC9F,MAAM,EAAE,MAAM,CAAA;IACd,yEAAyE;IACzE,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACxB,qDAAqD;IACrD,MAAM,EAAE,cAAc,CAAA;CACvB;AAuGD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAsJ/G;AAgCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CAkIrE"}
|
package/dist/backfill.js
CHANGED
|
@@ -388,7 +388,7 @@ export async function runBackfill(opts) {
|
|
|
388
388
|
parallelism: config.parallelism,
|
|
389
389
|
status: 'success',
|
|
390
390
|
});
|
|
391
|
-
return;
|
|
391
|
+
return 0;
|
|
392
392
|
}
|
|
393
393
|
// 3. Backfill with worker pool
|
|
394
394
|
let totalRecords = 0;
|
|
@@ -446,4 +446,5 @@ export async function runBackfill(opts) {
|
|
|
446
446
|
retry_rounds: retryRound,
|
|
447
447
|
status: failedCount > 0 ? 'partial' : 'success',
|
|
448
448
|
});
|
|
449
|
+
return totalRecords;
|
|
449
450
|
}
|
package/dist/main.js
CHANGED
|
@@ -143,15 +143,17 @@ runBackfill({
|
|
|
143
143
|
collections: collectionSet,
|
|
144
144
|
config: config.backfill,
|
|
145
145
|
})
|
|
146
|
-
.then(() => {
|
|
146
|
+
.then((recordCount) => {
|
|
147
147
|
log('[main] Backfill complete, rebuilding FTS indexes...');
|
|
148
|
-
return rebuildAllIndexes(collections);
|
|
148
|
+
return rebuildAllIndexes(collections).then(() => recordCount);
|
|
149
149
|
})
|
|
150
|
-
.then(() => {
|
|
150
|
+
.then((recordCount) => {
|
|
151
151
|
log('[main] FTS indexes ready');
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
if (recordCount > 0) {
|
|
153
|
+
logMemory('after-backfill');
|
|
154
|
+
log('[main] Restarting to reclaim memory...');
|
|
155
|
+
process.exit(1);
|
|
156
|
+
}
|
|
155
157
|
})
|
|
156
158
|
.catch((err) => {
|
|
157
159
|
console.error('[main] Backfill error:', err.message);
|