1
0

Fix tests

This commit is contained in:
Zef Hemel 2023-08-27 18:05:14 +02:00
parent c3d384330d
commit cc2448b91f

View File

@ -37,6 +37,7 @@ export class ServerSystem {
spacePrimitives!: SpacePrimitives; spacePrimitives!: SpacePrimitives;
private requeueInterval?: number; private requeueInterval?: number;
kvStore?: DenoKVStore; kvStore?: DenoKVStore;
listInterval?: number;
constructor( constructor(
private baseSpacePrimitives: SpacePrimitives, private baseSpacePrimitives: SpacePrimitives,
@ -122,7 +123,7 @@ export class ServerSystem {
markdownSyscalls(buildMarkdown(loadMarkdownExtensions(this.system))), markdownSyscalls(buildMarkdown(loadMarkdownExtensions(this.system))),
); );
setInterval(() => { this.listInterval = setInterval(() => {
space.updatePageList().catch(console.error); space.updatePageList().catch(console.error);
}, fileListInterval); }, fileListInterval);
@ -169,6 +170,7 @@ export class ServerSystem {
async close() { async close() {
clearInterval(this.requeueInterval); clearInterval(this.requeueInterval);
clearInterval(this.listInterval);
await this.system.unloadAll(); await this.system.unloadAll();
} }
} }