From 71a6ae687ed58b2c907532fb662a01e815904753 Mon Sep 17 00:00:00 2001 From: Jayant Krishnamurthy Date: Wed, 21 Sep 2022 11:06:13 -0700 Subject: [PATCH] Make this log message less noisy (#285) * make this log message less noisy * build Co-authored-by: Jayant Krishnamurthy --- third_party/pyth/price-service/src/ws.ts | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/third_party/pyth/price-service/src/ws.ts b/third_party/pyth/price-service/src/ws.ts index e703c040..14fe46fd 100644 --- a/third_party/pyth/price-service/src/ws.ts +++ b/third_party/pyth/price-service/src/ws.ts @@ -82,20 +82,14 @@ export class WebSocketAPI { return; } + const clients: Set = this.priceFeedClients.get(priceInfo.priceFeed.id)!; logger.info( `Sending ${priceInfo.priceFeed.id} price update to ${ - this.priceFeedClients.get(priceInfo.priceFeed.id)!.size - } clients` + clients.size + } clients: ${Array.from(clients.values()).map((ws, _idx, _arr) => this.wsId.get(ws))}` ); - for (let client of this.priceFeedClients - .get(priceInfo.priceFeed.id)! - .values()) { - logger.info( - `Sending ${ - priceInfo.priceFeed.id - } price update to client ${this.wsId.get(client)}` - ); + for (let client of clients.values()) { this.promClient?.addWebSocketInteraction("server_update", "ok"); let verbose = this.priceFeedClientsVerbosity