feat: upgrade caches to worker

This commit is contained in:
2024-01-17 15:47:01 +00:00
parent 3c808688f8
commit aa58ec4185
32 changed files with 698 additions and 417 deletions

View File

@ -1,11 +1,11 @@
import { FeedCache, unixNowMs } from "@snort/shared";
import { CachedTable, unixNowMs } from "@snort/shared";
import { RelayMetrics } from "./cache";
import { TraceReport } from "./query";
export class RelayMetricHandler {
readonly #cache: FeedCache<RelayMetrics>;
readonly #cache: CachedTable<RelayMetrics>;
constructor(cache: FeedCache<RelayMetrics>) {
constructor(cache: CachedTable<RelayMetrics>) {
this.#cache = cache;
setInterval(() => {