@semiont/make-meaning 0.5.31 → 0.5.32
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/archivist-main.js +11 -0
- package/dist/archivist-main.js.map +1 -1
- package/package.json +12 -12
package/dist/archivist-main.js
CHANGED
|
@@ -12511,6 +12511,17 @@ async function authenticate() {
|
|
|
12511
12511
|
async function main() {
|
|
12512
12512
|
const { initObservabilityNode } = await import('@semiont/observability/node');
|
|
12513
12513
|
initObservabilityNode({ serviceName: "semiont-archivist" });
|
|
12514
|
+
const { registerRestartCountProvider } = await import('@semiont/observability');
|
|
12515
|
+
const supervisorEvents = "/semiont-state/archivist-supervisor/events.log";
|
|
12516
|
+
registerRestartCountProvider(async () => {
|
|
12517
|
+
try {
|
|
12518
|
+
const { readFile } = await import('fs/promises');
|
|
12519
|
+
const log = await readFile(supervisorEvents, "utf-8");
|
|
12520
|
+
return Math.max(0, log.split("\n").filter((l) => l.includes("starting archivist")).length - 1);
|
|
12521
|
+
} catch {
|
|
12522
|
+
return 0;
|
|
12523
|
+
}
|
|
12524
|
+
});
|
|
12514
12525
|
logger.info("Authenticating", { baseUrl });
|
|
12515
12526
|
const tokenSubject = new import_rxjs6.BehaviorSubject(accessToken(await authenticate()));
|
|
12516
12527
|
logger.info("Authenticated");
|