Fixes #115: By introducing MQ workers

This commit is contained in:
Zef Hemel
2023-08-10 18:32:41 +02:00
parent c6fce524e6
commit 97a84e8538
16 changed files with 544 additions and 7 deletions
+8
View File
@@ -30,6 +30,9 @@ import {
loadMarkdownExtensions,
MDExt,
} from "../common/markdown_parser/markdown_ext.ts";
import { DexieMQ } from "../plugos/lib/mq.dexie.ts";
import { MQHook } from "../plugos/hooks/mq.ts";
import { mqSyscalls } from "../plugos/syscalls/mq.dexie.ts";
export class ClientSystem {
system: System<SilverBulletHooks> = new System("client");
@@ -44,6 +47,7 @@ export class ClientSystem {
constructor(
private editor: Client,
private kvStore: DexieKVStore,
private mq: DexieMQ,
private dbPrefix: string,
private eventHook: EventHook,
) {
@@ -66,6 +70,9 @@ export class ClientSystem {
this.codeWidgetHook = new CodeWidgetHook();
this.system.addHook(this.codeWidgetHook);
// MQ hook
this.system.addHook(new MQHook(this.system, this.mq));
// Command hook
this.commandHook = new CommandHook();
this.commandHook.on({
@@ -115,6 +122,7 @@ export class ClientSystem {
markdownSyscalls(buildMarkdown(this.mdExtensions)),
assetSyscalls(this.system),
yamlSyscalls(),
mqSyscalls(this.mq),
storeCalls,
this.indexSyscalls,
debugSyscalls(),