reduce heartbeat updates

This commit is contained in:
Ben Wilson
2024-01-15 19:47:04 -05:00
parent 982194b4e9
commit 1d6670051f
2 changed files with 9 additions and 3 deletions
+2 -2
View File
@@ -45,8 +45,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>) {