Work on plug:run
This commit is contained in:
@@ -8,9 +8,11 @@ export class DexieKVStore implements KVStore {
|
||||
dbName: string,
|
||||
tableName: string,
|
||||
indexedDB?: any,
|
||||
IDBKeyRange?: any,
|
||||
) {
|
||||
this.db = new Dexie(dbName, {
|
||||
indexedDB,
|
||||
IDBKeyRange,
|
||||
});
|
||||
this.db.version(1).stores({
|
||||
[tableName]: "key",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Dexie, { Table } from "dexie";
|
||||
import { Message } from "$sb/mq.ts";
|
||||
import { Message, QueueStats } from "$sb/types.ts";
|
||||
|
||||
export type ProcessingMessage = Message & {
|
||||
ts: number;
|
||||
@@ -10,12 +10,6 @@ export type SubscribeOptions = {
|
||||
pollInterval?: number;
|
||||
};
|
||||
|
||||
export type QueueStats = {
|
||||
queued: number;
|
||||
processing: number;
|
||||
dlq: number;
|
||||
};
|
||||
|
||||
export class DexieMQ {
|
||||
db: Dexie;
|
||||
queued: Table<Message, [string, string]>;
|
||||
|
||||
Reference in New Issue
Block a user