Fix immediate automation pause, restored queue rendering and bounded disk reads; release 2.1.75
CI / verify (push) Canceled after 0s

This commit is contained in:
Sucukdeluxe committed 2026-10-20 13:56:04 +02:00
1 parent 267a840853
commit 80eb878f1b
12 files changed
+168 -68

No files matched your search

+12 -2
View File
@@ -535,12 +535,22 @@ class ConfigStore {
_enqueueWrite(fn, options = {}) {
if (this._writesQuiesced && !options.allowDuringQuiesce) return Promise.reject(this._quiescedWriteError());
const previous = this._lastQueuedWrite;
if (options.coalesceKey && previous?.key === options.coalesceKey && !previous.started) {
previous.fn = fn;
return previous.operation;
}
const queued = { key: options.coalesceKey, fn, started: false, operation: null };
this._lastQueuedWrite = queued;
this._wqDepth++;
const execute = async () => {
queued.started = true;
if (this._lastQueuedWrite === queued) this._lastQueuedWrite = null;
if (!options.skipRefresh) await this._refreshConfigFromDisk();
return fn();
return queued.fn();
};
const operation = this._writeQueue.then(execute, execute);
queued.operation = operation;
this._pendingWriteOperations.add(operation);
this._writeQueue = operation.then(
() => { this._wqDepth--; },
@@ -613,7 +623,7 @@ class ConfigStore {
};
await this._guardHosters(current, false);
return this._commit(current);
}, options);
}, { ...options, coalesceKey: 'pending-queue' });
}
saveFolderMonitorRuntimeState(folderMonitor, options = {}) {