small log changes

This commit is contained in:
Nour Alharithi
2023-12-27 18:22:41 -08:00
parent 343344356e
commit 42f8ecea7d
3 changed files with 22 additions and 17 deletions

View File

@@ -818,7 +818,9 @@ const main = async () => {
client: redisClients[nextClientIndex], client: redisClients[nextClientIndex],
clientIndex: nextClientIndex, clientIndex: nextClientIndex,
}); });
console.log('Rotated redis client to index ', nextClientIndex); console.log(
`Rotated redis client to index ${nextClientIndex} for perp market ${normedMarketIndex}`
);
} }
} }
} else if ( } else if (
@@ -858,7 +860,9 @@ const main = async () => {
client: redisClients[nextClientIndex], client: redisClients[nextClientIndex],
clientIndex: nextClientIndex, clientIndex: nextClientIndex,
}); });
console.log('Rotated redis client to index ', nextClientIndex); console.log(
`Rotated redis client to index ${nextClientIndex} for spot market ${normedMarketIndex}`
);
} }
} }
} }
@@ -1032,8 +1036,7 @@ const main = async () => {
clientIndex: nextClientIndex, clientIndex: nextClientIndex,
}); });
console.log( console.log(
'Rotated redis client to index ', `Rotated redis client to index ${nextClientIndex} for perp market ${normedMarketIndex}`
nextClientIndex
); );
} }
} }
@@ -1078,8 +1081,7 @@ const main = async () => {
clientIndex: nextClientIndex, clientIndex: nextClientIndex,
}); });
console.log( console.log(
'Rotated redis client to index ', `Rotated redis client to index ${nextClientIndex} for spot market ${normedMarketIndex}`
nextClientIndex
); );
} }
} }

View File

@@ -324,7 +324,8 @@ const main = async () => {
const initAllMarketSubscribersStart = Date.now(); const initAllMarketSubscribersStart = Date.now();
MARKET_SUBSCRIBERS = await initializeAllMarketSubscribers(driftClient); MARKET_SUBSCRIBERS = await initializeAllMarketSubscribers(driftClient);
logger.info( logger.info(
`All market subscribers initialized in ${Date.now() - initAllMarketSubscribersStart `All market subscribers initialized in ${
Date.now() - initAllMarketSubscribersStart
} ms` } ms`
); );

View File

@@ -206,7 +206,7 @@ const main = async () => {
); );
const handleStartup = async (_req, res, _next) => { const handleStartup = async (_req, res, _next) => {
let healthy= false; let healthy = false;
for (const redisClient of redisClients) { for (const redisClient of redisClients) {
if (redisClient.connected) { if (redisClient.connected) {
healthy = true; healthy = true;
@@ -291,7 +291,9 @@ const main = async () => {
client: redisClients[nextClientIndex], client: redisClients[nextClientIndex],
clientIndex: nextClientIndex, clientIndex: nextClientIndex,
}); });
console.log('Rotated redis client to index ', nextClientIndex); console.log(
`Rotated redis client to index ${nextClientIndex} for perp market ${normedMarketIndex}`
);
} }
} }
} }
@@ -331,7 +333,9 @@ const main = async () => {
client: redisClients[nextClientIndex], client: redisClients[nextClientIndex],
clientIndex: nextClientIndex, clientIndex: nextClientIndex,
}); });
console.log('Rotated redis client to index ', nextClientIndex); console.log(
`Rotated redis client to index ${nextClientIndex} for spot market ${normedMarketIndex}`
);
} }
} }
} }
@@ -456,8 +460,7 @@ const main = async () => {
clientIndex: nextClientIndex, clientIndex: nextClientIndex,
}); });
console.log( console.log(
'Rotated redis client to index ', `Rotated redis client to index ${nextClientIndex} for perp market ${normedMarketIndex}`
nextClientIndex
); );
} }
} }
@@ -502,8 +505,7 @@ const main = async () => {
clientIndex: nextClientIndex, clientIndex: nextClientIndex,
}); });
console.log( console.log(
'Rotated redis client to index ', `Rotated redis client to index ${nextClientIndex} for spot market ${normedMarketIndex}`
nextClientIndex
); );
} }
} }