diff --git a/backend/src/plugins/Persist/PersistPlugin.ts b/backend/src/plugins/Persist/PersistPlugin.ts index ecd50067c..bc914c444 100644 --- a/backend/src/plugins/Persist/PersistPlugin.ts +++ b/backend/src/plugins/Persist/PersistPlugin.ts @@ -3,7 +3,6 @@ import { GuildLogs } from "../../data/GuildLogs"; import { GuildPersistedData } from "../../data/GuildPersistedData"; import { makeIoTsConfigParser } from "../../pluginUtils"; import { trimPluginDescription } from "../../utils"; -import { GuildMemberCachePlugin } from "../GuildMemberCache/GuildMemberCachePlugin"; import { LogsPlugin } from "../Logs/LogsPlugin"; import { RoleManagerPlugin } from "../RoleManager/RoleManagerPlugin"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; @@ -31,7 +30,7 @@ export const PersistPlugin = zeppelinGuildPlugin()({ configSchema: ConfigSchema, }, - dependencies: () => [LogsPlugin, RoleManagerPlugin, GuildMemberCachePlugin], + dependencies: () => [LogsPlugin, RoleManagerPlugin], configParser: makeIoTsConfigParser(ConfigSchema), defaultOptions, diff --git a/backend/src/plugins/Persist/events/StoreDataEvt.ts b/backend/src/plugins/Persist/events/StoreDataEvt.ts index 537c7b625..9385c2795 100644 --- a/backend/src/plugins/Persist/events/StoreDataEvt.ts +++ b/backend/src/plugins/Persist/events/StoreDataEvt.ts @@ -1,5 +1,4 @@ import { PersistedData } from "../../../data/entities/PersistedData"; -import { GuildMemberCachePlugin } from "../../GuildMemberCache/GuildMemberCachePlugin"; import { persistEvt } from "../types"; export const StoreDataEvt = persistEvt({ @@ -9,8 +8,11 @@ export const StoreDataEvt = persistEvt({ const config = await pluginData.config.getForUser(member.user); const persistData: Partial = {}; + // FIXME: New caching thing, or fix deadlocks with this plugin if (member.partial) { + return; // Djs hasn't cached member data => use db cache + /* const data = await pluginData.getPlugin(GuildMemberCachePlugin).getCachedMemberData(member.id); if (!data) { return; @@ -22,7 +24,7 @@ export const StoreDataEvt = persistEvt({ } if (config.persist_nicknames && data.nickname) { persistData.nickname = data.nickname; - } + }*/ } else { // Djs has cached member data => use that const memberRoles = Array.from(member.roles.cache.keys()); diff --git a/backend/src/plugins/availablePlugins.ts b/backend/src/plugins/availablePlugins.ts index 58af41fc3..3df9c347a 100644 --- a/backend/src/plugins/availablePlugins.ts +++ b/backend/src/plugins/availablePlugins.ts @@ -12,7 +12,6 @@ import { CustomEventsPlugin } from "./CustomEvents/CustomEventsPlugin"; import { GuildAccessMonitorPlugin } from "./GuildAccessMonitor/GuildAccessMonitorPlugin"; import { GuildConfigReloaderPlugin } from "./GuildConfigReloader/GuildConfigReloaderPlugin"; import { GuildInfoSaverPlugin } from "./GuildInfoSaver/GuildInfoSaverPlugin"; -import { GuildMemberCachePlugin } from "./GuildMemberCache/GuildMemberCachePlugin"; import { InternalPosterPlugin } from "./InternalPoster/InternalPosterPlugin"; import { LocateUserPlugin } from "./LocateUser/LocateUserPlugin"; import { LogsPlugin } from "./Logs/LogsPlugin"; @@ -54,7 +53,7 @@ export const guildPlugins: Array> = [ PostPlugin, ReactionRolesPlugin, MessageSaverPlugin, - GuildMemberCachePlugin, + // GuildMemberCachePlugin, // FIXME: New caching thing, or fix deadlocks with this plugin ModActionsPlugin, NameHistoryPlugin, RemindersPlugin, @@ -93,7 +92,7 @@ export const baseGuildPlugins: Array> = [ GuildInfoSaverPlugin, MessageSaverPlugin, NameHistoryPlugin, - GuildMemberCachePlugin, + // GuildMemberCachePlugin, // FIXME: New caching thing, or fix deadlocks with this plugin CasesPlugin, MutesPlugin, TimeAndDatePlugin,