chore (backend): update meta cache every 5 mins

This commit is contained in:
naskya 2024-04-22 08:57:00 +09:00
parent 0c1e7cdd72
commit 9acd130a22
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C

View file

@ -9,6 +9,7 @@ import semver from "semver";
import Logger from "@/services/logger.js";
import type { Config } from "backend-rs";
import { fetchMeta } from "backend-rs";
import { config, envOption } from "@/config.js";
import { showMachineInfo } from "@/misc/show-machine-info.js";
import { db, initDb } from "@/db/postgre.js";
@ -123,6 +124,9 @@ export async function masterMain() {
import("../daemons/queue-stats.js").then((x) => x.default());
import("../daemons/janitor.js").then((x) => x.default());
}
// Update meta cache every 5 minitues
setInterval(() => fetchMeta(false), 1000 * 60 * 5);
}
function showEnvironment(): void {