wip
This commit is contained in:
parent
2dd0e07297
commit
1959e0a49c
|
@ -16,7 +16,7 @@ import type { OnApplicationShutdown } from '@nestjs/common';
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class MetaService implements OnApplicationShutdown {
|
export class MetaService implements OnApplicationShutdown {
|
||||||
private cache: MiMeta | undefined;
|
private cache: MiMeta | undefined;
|
||||||
private intervalId: NodeJS.Timer;
|
private intervalId: NodeJS.Timeout;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@Inject(DI.redisForSub)
|
@Inject(DI.redisForSub)
|
||||||
|
|
|
@ -23,7 +23,7 @@ import type { OnApplicationShutdown } from '@nestjs/common';
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ChartManagementService implements OnApplicationShutdown {
|
export class ChartManagementService implements OnApplicationShutdown {
|
||||||
private charts;
|
private charts;
|
||||||
private saveIntervalId: NodeJS.Timer;
|
private saveIntervalId: NodeJS.Timeout;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private federationChart: FederationChart,
|
private federationChart: FederationChart,
|
||||||
|
|
|
@ -14,7 +14,7 @@ const interval = 30 * 60 * 1000;
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class JanitorService implements OnApplicationShutdown {
|
export class JanitorService implements OnApplicationShutdown {
|
||||||
private intervalId: NodeJS.Timer;
|
private intervalId: NodeJS.Timeout;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@Inject(DI.attestationChallengesRepository)
|
@Inject(DI.attestationChallengesRepository)
|
||||||
|
|
|
@ -19,7 +19,7 @@ const interval = 10000;
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class QueueStatsService implements OnApplicationShutdown {
|
export class QueueStatsService implements OnApplicationShutdown {
|
||||||
private intervalId: NodeJS.Timer;
|
private intervalId: NodeJS.Timeout;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@Inject(DI.config)
|
@Inject(DI.config)
|
||||||
|
|
|
@ -193,7 +193,7 @@ function nothingToDo<T, V = T>(value: T): V {
|
||||||
export class MemoryKVCache<T, V = T> {
|
export class MemoryKVCache<T, V = T> {
|
||||||
public cache: Map<string, { date: number; value: V; }>;
|
public cache: Map<string, { date: number; value: V; }>;
|
||||||
private lifetime: number;
|
private lifetime: number;
|
||||||
private gcIntervalHandle: NodeJS.Timer;
|
private gcIntervalHandle: NodeJS.Timeout;
|
||||||
private toMapConverter: (value: T) => V;
|
private toMapConverter: (value: T) => V;
|
||||||
private fromMapConverter: (cached: V) => T | undefined;
|
private fromMapConverter: (cached: V) => T | undefined;
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ const accessDenied = {
|
||||||
export class ApiCallService implements OnApplicationShutdown {
|
export class ApiCallService implements OnApplicationShutdown {
|
||||||
private logger: Logger;
|
private logger: Logger;
|
||||||
private userIpHistories: Map<MiUser['id'], Set<string>>;
|
private userIpHistories: Map<MiUser['id'], Set<string>>;
|
||||||
private userIpHistoriesClearIntervalId: NodeJS.Timer;
|
private userIpHistoriesClearIntervalId: NodeJS.Timeout;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@Inject(DI.userIpsRepository)
|
@Inject(DI.userIpsRepository)
|
||||||
|
|
|
@ -19,7 +19,7 @@ class UserListChannel extends Channel {
|
||||||
public static requireCredential = false;
|
public static requireCredential = false;
|
||||||
private listId: string;
|
private listId: string;
|
||||||
public listUsers: MiUser['id'][] = [];
|
public listUsers: MiUser['id'][] = [];
|
||||||
private listUsersClock: NodeJS.Timer;
|
private listUsersClock: NodeJS.Timeout;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private userListsRepository: UserListsRepository,
|
private userListsRepository: UserListsRepository,
|
||||||
|
|
Loading…
Reference in New Issue