mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2025-04-14 14:59:33 +02:00
bug
This commit is contained in:
parent
fd24807c55
commit
8584c442dc
@ -33,7 +33,14 @@ export class ClientStatisticsService {
|
||||
// }
|
||||
|
||||
public updateBulkAsync(clientStatistic: Partial<ClientStatisticsEntity>) {
|
||||
this.bulkAsyncUpdates[clientStatistic.client + clientStatistic.time.toString()] = clientStatistic;
|
||||
const key = clientStatistic.clientId + clientStatistic.time.toString();
|
||||
if(this.bulkAsyncUpdates[key] != null){
|
||||
this.bulkAsyncUpdates[key].shares = clientStatistic.shares;
|
||||
this.bulkAsyncUpdates[key].acceptedCount = clientStatistic.acceptedCount;
|
||||
return;
|
||||
}
|
||||
|
||||
this.bulkAsyncUpdates[clientStatistic.clientId + clientStatistic.time.toString()] = clientStatistic;
|
||||
}
|
||||
|
||||
public async doBulkAsyncUpdate(){
|
||||
|
@ -51,7 +51,7 @@ export class AppService implements OnModuleInit {
|
||||
}
|
||||
|
||||
setInterval(async () => {
|
||||
console.log('Bulk update client stats');
|
||||
//console.log('Bulk update client stats');
|
||||
await this.clientStatisticsService.doBulkAsyncUpdate();
|
||||
}, 1000 * 60 * 1);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user