Restore DB-backed connected miner hashrate

This commit is contained in:
Ben
2026-06-20 15:27:33 -04:00
parent c3ad01a38f
commit cd0cb9bfe0
7 changed files with 124 additions and 0 deletions
+4
View File
@@ -58,6 +58,10 @@ export class ClientService {
.execute();
}
public async updateHashRate(id: string, hashRate: number, updatedAt = new Date()) {
return await this.clientRepository.update({ id }, { hashRate, updatedAt });
}
public async connectedClientCount(): Promise<number> {
return await this.clientRepository.count();
}