enhance(backend): 古いアンテナを自動停止するか切り替え可能に

Resolve #11785
This commit is contained in:
syuilo
2023-09-07 16:20:28 +09:00
parent b1efc298f7
commit d8dc10829c
3 changed files with 16 additions and 6 deletions

View File

@@ -88,6 +88,7 @@ type Source = {
perChannelMaxNoteCacheCount?: number;
perUserNotificationsMaxCount?: number;
deactivateAntennaThreshold?: number;
};
export type Config = {
@@ -161,6 +162,7 @@ export type Config = {
redisForJobQueue: RedisOptions & RedisOptionsSource;
perChannelMaxNoteCacheCount: number;
perUserNotificationsMaxCount: number;
deactivateAntennaThreshold: number;
};
const _filename = fileURLToPath(import.meta.url);
@@ -252,6 +254,7 @@ export function loadConfig(): Config {
clientManifestExists: clientManifestExists,
perChannelMaxNoteCacheCount: config.perChannelMaxNoteCacheCount ?? 1000,
perUserNotificationsMaxCount: config.perUserNotificationsMaxCount ?? 300,
deactivateAntennaThreshold: config.deactivateAntennaThreshold ?? (1000 * 60 * 60 * 24 * 7),
};
}