feat: process worker messages in queue

This commit is contained in:
2024-01-18 11:17:57 +00:00
parent 2ea516e636
commit 6d8c0325e4
8 changed files with 92 additions and 65 deletions

View File

@ -1,17 +0,0 @@
import { FeedCache } from "@snort/shared";
import { db, Payment } from "@/Db";
export class Payments extends FeedCache<Payment> {
constructor() {
super("PaymentsCache", db.payments);
}
key(of: Payment): string {
return of.url;
}
takeSnapshot(): Array<Payment> {
return [...this.cache.values()];
}
}

View File

@ -3,7 +3,6 @@ import { SnortSystemDb } from "@snort/system-web";
import { ChatCache } from "./ChatCache";
import { GiftWrapCache } from "./GiftWrapCache";
import { Payments } from "./PaymentsCache";
export const SystemDb = new SnortSystemDb();
export const UserCache = new UserProfileCache(SystemDb.users);
@ -11,7 +10,6 @@ export const UserRelays = new UserRelaysCache(SystemDb.userRelays);
export const RelayMetrics = new RelayMetricCache(SystemDb.relayMetrics);
export const Chats = new ChatCache();
export const PaymentsCache = new Payments();
export const GiftsCache = new GiftWrapCache();
export async function preload(follows?: Array<string>) {