document-dataply 0.0.14-alpha.4 → 0.0.14
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/cjs/index.js
CHANGED
|
@@ -14780,7 +14780,11 @@ var AnalysisManager = class {
|
|
|
14780
14780
|
if (this.flushing) return;
|
|
14781
14781
|
await this.api.flushAnalysis();
|
|
14782
14782
|
}, {
|
|
14783
|
-
paused: true
|
|
14783
|
+
paused: true,
|
|
14784
|
+
unref: true,
|
|
14785
|
+
catch: (err) => {
|
|
14786
|
+
this.logger.error("Error in analysis cron job", err);
|
|
14787
|
+
}
|
|
14784
14788
|
});
|
|
14785
14789
|
}
|
|
14786
14790
|
providers = /* @__PURE__ */ new Map();
|
|
@@ -14847,11 +14851,11 @@ var AnalysisManager = class {
|
|
|
14847
14851
|
}
|
|
14848
14852
|
}
|
|
14849
14853
|
/**
|
|
14850
|
-
*
|
|
14854
|
+
* Resume the background analysis cron job.
|
|
14851
14855
|
*/
|
|
14852
|
-
|
|
14856
|
+
resumeCron() {
|
|
14853
14857
|
if (this.cron && !this.cron.isRunning()) {
|
|
14854
|
-
this.cron.
|
|
14858
|
+
this.cron.resume();
|
|
14855
14859
|
}
|
|
14856
14860
|
}
|
|
14857
14861
|
/**
|
|
@@ -15050,7 +15054,7 @@ var DocumentDataplyAPI = class extends import_dataply4.DataplyAPI {
|
|
|
15050
15054
|
this.documentFormatter = new DocumentFormatter();
|
|
15051
15055
|
this.analysisManager = new AnalysisManager(
|
|
15052
15056
|
this,
|
|
15053
|
-
options.analysisSchedule ?? "
|
|
15057
|
+
options.analysisSchedule ?? "0 */1 * * *",
|
|
15054
15058
|
options.analysisSampleSize ?? 1e3,
|
|
15055
15059
|
this.loggerManager
|
|
15056
15060
|
);
|
|
@@ -15073,7 +15077,7 @@ var DocumentDataplyAPI = class extends import_dataply4.DataplyAPI {
|
|
|
15073
15077
|
this.logger.debug(`Indices initialized. Total indices: ${Object.keys(metadata.indices).length}`);
|
|
15074
15078
|
this.analysisManager.registerBuiltinProviders();
|
|
15075
15079
|
await this.analysisManager.initializeProviders(tx);
|
|
15076
|
-
this.analysisManager.
|
|
15080
|
+
this.analysisManager.resumeCron();
|
|
15077
15081
|
this._initialized = true;
|
|
15078
15082
|
this.logger.info("Document database fully initialized");
|
|
15079
15083
|
return tx;
|
|
@@ -38,9 +38,9 @@ export declare class AnalysisManager<T extends DocumentJSON> {
|
|
|
38
38
|
*/
|
|
39
39
|
initializeProviders(tx: Transaction): Promise<void>;
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Resume the background analysis cron job.
|
|
42
42
|
*/
|
|
43
|
-
|
|
43
|
+
resumeCron(): void;
|
|
44
44
|
/**
|
|
45
45
|
* Notify all realtime providers that documents were inserted.
|
|
46
46
|
* Data is persisted immediately after each provider processes the mutation.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "document-dataply",
|
|
3
|
-
"version": "0.0.14
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"description": "Simple and powerful JSON document database supporting complex queries and flexible indexing policies.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "izure <admin@izure.org>",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"croner": "^10.0.1",
|
|
46
|
-
"dataply": "^0.0.26
|
|
46
|
+
"dataply": "^0.0.26"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/jest": "^30.0.0",
|
|
@@ -52,4 +52,4 @@
|
|
|
52
52
|
"ts-jest": "^29.4.6",
|
|
53
53
|
"typescript": "^5.9.3"
|
|
54
54
|
}
|
|
55
|
-
}
|
|
55
|
+
}
|