HEX
Server: Apache/2.4.63 (Unix)
System: Linux Synopilou92 4.4.302+ #72806 SMP Mon Jul 21 23:16:00 CST 2025 x86_64
User: pilou92 (1026)
PHP: 8.0.30
Disabled: NONE
Upload Files
File: /volume1/@appstore/Spreadsheet/server/common/collab/Application.js
"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"default",{enumerable:true,get:function(){return a}});const t=r(require("./Application2"));const e=r(require("os"));const s=require("@synology-office/task-queue");function r(t){return t&&t.__esModule?t:{default:t}}class a extends t.default{constructor(){super();this.migratorPool=this.createMigratorPool();this.snapshotter=this.createSnapshotter();this.snapshotQueue=new s.TaskQueue({concurrency:e.default.cpus().length})}initSnapshotDispatcher(){const t=this.createSnapshotDispatcher();t.on("workerExit",(t=>{for(const e of t){this.reloadData(e).catch((()=>{this.getInstance(e)?.forceDestroy()}))}}));return t}getSnapshotter(){return this.snapshotter}requestSnapshot(t){return this.snapshotQueue.enqueue(t)}getMigrator(){return this.migratorPool}stat(t,e){this.doStat().then((t=>{e(t)}))}async doStat(){const t=Promise.all(this.instanceStore.map((t=>t.stat())));const e=this.getMigrator().stat();const s=this.getSnapshotter().stat();return{instances:await t,authentication:this.ioServer.stat(),migrator:await e,snapshotter:await s}}async reloadData(t){const e=this.getInstance(t);if(!e){return}await e.loadFromDriveAsync(true)}}