Setup relay metrics

This commit is contained in:
2023-06-17 19:42:09 +01:00
parent 119d1c526e
commit 84c639ee30
8 changed files with 79 additions and 13 deletions

View File

@ -1,9 +1,10 @@
import { UserProfileCache, UserRelaysCache } from "@snort/system";
import { UserProfileCache, UserRelaysCache, RelayMetricCache } from "@snort/system";
import { DmCache } from "./DMCache";
import { InteractionCache } from "./EventInteractionCache";
export const UserCache = new UserProfileCache();
export const UserRelays = new UserRelaysCache();
export const RelayMetrics = new RelayMetricCache();
export { DmCache };
export async function preload(follows?: Array<string>) {
@ -12,6 +13,7 @@ export async function preload(follows?: Array<string>) {
DmCache.preload(),
InteractionCache.preload(),
UserRelays.preload(follows),
RelayMetrics.preload(),
];
await Promise.all(preloads);
}