Skip to content

Commit

Permalink
Updated heartbeat dto
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed May 1, 2024
1 parent a63a2cc commit 157979d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/event/dto/heartbeat.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { IsString } from 'class-validator';

/**
* DTO for a service replica heartbeat.
* @property service - The unique name of the service.
* @property replica - The unique ID of the replica.
* @property ServiceName - The unique name of the service.
* @property ReplicaId - The unique ID of the replica.
*/
export class HeartbeatDto {
@IsString()
service: string;
ServiceName: string;
@IsString()
replica: string;
ReplicaId: string;
}
6 changes: 3 additions & 3 deletions src/event/event.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ export class EventController {
@Post('heartbeat')
async processHeartbeat(@Body() event: HeartbeatDto): Promise<void> {
// Extract the order context from the event
const { service, replica } = event;
const { ServiceName, ReplicaId } = event;
this.logger.debug(
`Received heartbeat for replica "${replica}" of service "${service}"`,
`Received heartbeat for replica "${ReplicaId}" of service "${ServiceName}"`,
);

this.eventService.heartbeat(service, replica);
this.eventService.heartbeat(ServiceName, ReplicaId);
}
}

0 comments on commit 157979d

Please sign in to comment.