Fix radar service for new node counter updates

This commit is contained in:
Hakan Shehu
2025-04-29 12:20:01 +02:00
parent 71be5f6e3e
commit d52a8972cc
3 changed files with 24 additions and 1 deletions

View File

@@ -28,6 +28,17 @@ export class AccountMetadataListQueryHandler
if (
event.type === 'account_created' &&
event.account.id === input.accountId
) {
const result = await this.handleQuery(input);
return {
hasChanges: true,
result,
};
}
if (
event.type === 'account_deleted' &&
event.account.id === input.accountId
) {
return {
hasChanges: true,

View File

@@ -33,6 +33,18 @@ export class WorkspaceMetadataListQueryHandler
event.type === 'workspace_created' &&
event.workspace.accountId === input.accountId &&
event.workspace.id === input.workspaceId
) {
const result = await this.handleQuery(input);
return {
hasChanges: true,
result,
};
}
if (
event.type === 'workspace_deleted' &&
event.workspace.accountId === input.accountId &&
event.workspace.id === input.workspaceId
) {
return {
hasChanges: true,

View File

@@ -104,7 +104,7 @@ export class RadarService {
}
if (!this.counters.has(event.counter.nodeId)) {
return;
this.counters.set(event.counter.nodeId, new Map());
}
const nodeCounters = this.counters.get(event.counter.nodeId);