Handle large WeebCentral catalogs and correct MangaPill checkpoint monitoring

This commit is contained in:
Codex committed 2026-10-14 14:01:05 +02:00
1 parent 0d51f214d5
commit edbc9c6056
11 files changed
+102 -7

No files matched your search

+12
View File
@@ -24,3 +24,15 @@ test('Sentinel reports service failures without restart loops and resolves recov
await monitor.observe({ ok: true }, { active: [], queue: [], paused: false });
assert.equal(monitor.state.status, 'healthy'); assert.ok(monitor.incidents.every(i => i.state === 'resolved'));
});
test('missing checkpoint does not trigger a false stall recovery', async () => {
let now = 0, recoveries = 0;
const monitor = new Monitor({ now: () => now, stallMs: 100 });
const state = { paused: false, active: [{ source: 'mangapill', current: { id: 'job', title: 'Manga' }, job: null }], queue: [] };
for (const advance of [0, 1000000, 2000000]) {
now = advance;
await monitor.observe({ ok: true }, state, async () => { recoveries++; return { changed: true }; });
}
assert.equal(recoveries, 0);
assert.equal(monitor.incidents.some(item => item.key === 'stall:job'), false);
});