reduce heartbeat updates

This commit is contained in:
Ben Wilson
2024-01-14 14:10:47 -05:00
parent 40e32d6e1a
commit fc767fa770
2 changed files with 9 additions and 3 deletions
+2 -2
View File
@@ -28,8 +28,8 @@ export class ClientService {
.execute();
}
public async heartbeat(address: string, clientName: string, sessionId: string, hashRate: number) {
return await this.clientRepository.update({ address, clientName, sessionId }, { hashRate, deletedAt: null, updatedAt: new Date() });
public async heartbeat(address: string, clientName: string, sessionId: string, hashRate: number, updatedAt: Date) {
return await this.clientRepository.update({ address, clientName, sessionId }, { hashRate, deletedAt: null, updatedAt });
}
// public async save(client: Partial<ClientEntity>) {