From 841f1d6d2a83d0cdd19dbd92a77e9229acb17610 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Sun, 17 Oct 2021 00:41:21 +0200 Subject: :art: clean up instances on start --- api/src/util/Instance.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/src/util/Instance.ts b/api/src/util/Instance.ts index 7dcd126e..6bddfa98 100644 --- a/api/src/util/Instance.ts +++ b/api/src/util/Instance.ts @@ -1,4 +1,4 @@ -import { Config, Guild } from "@fosscord/util"; +import { Config, Guild, Session } from "@fosscord/util"; export async function initInstance() { // TODO: clean up database and delete tombstone data @@ -15,4 +15,7 @@ export async function initInstance() { await Config.set({ guild: { autoJoin: { guilds: [guild.id] } } }); } } + + // TODO: do no clear sessions for instance cluster + await Session.delete({}); } -- cgit 1.4.1