use QuantumKVCache in FederatedInstanceService

This commit is contained in:
Hazelnoot 2025-06-18 01:34:38 -04:00
parent 8f436ef8ca
commit 86b8a8a734

View file

@ -16,6 +16,7 @@ import { TimeService, type TimerHandle } from '@/global/TimeService.js';
import { MiInstance } from '@/models/Instance.js'; import { MiInstance } from '@/models/Instance.js';
import { diffArrays } from '@/misc/diff-arrays.js'; import { diffArrays } from '@/misc/diff-arrays.js';
import type { MetasRepository } from '@/models/_.js'; import type { MetasRepository } from '@/models/_.js';
import { FederatedInstanceService } from '@/core/FederatedInstanceService.js';
import type { OnApplicationShutdown } from '@nestjs/common'; import type { OnApplicationShutdown } from '@nestjs/common';
@Injectable() @Injectable()
@ -36,6 +37,7 @@ export class MetaService implements OnApplicationShutdown {
private featuredService: FeaturedService, private featuredService: FeaturedService,
private globalEventService: GlobalEventService, private globalEventService: GlobalEventService,
private readonly timeService: TimeService, private readonly timeService: TimeService,
private readonly federatedInstanceService: FederatedInstanceService,
) { ) {
//this.onMessage = this.onMessage.bind(this); //this.onMessage = this.onMessage.bind(this);
@ -156,6 +158,7 @@ export class MetaService implements OnApplicationShutdown {
}); });
} }
await this.federatedInstanceService.syncCache(before, updated);
this.globalEventService.publishInternalEvent('metaUpdated', { before, after: updated }); this.globalEventService.publishInternalEvent('metaUpdated', { before, after: updated });
return updated; return updated;