small log changes
This commit is contained in:
14
src/index.ts
14
src/index.ts
@@ -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
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -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}`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -424,7 +428,7 @@ const main = async () => {
|
|||||||
) {
|
) {
|
||||||
let redisL2: string;
|
let redisL2: string;
|
||||||
const redisClient =
|
const redisClient =
|
||||||
perpMarketRedisMap.get(normedMarketIndex).client;
|
perpMarketRedisMap.get(normedMarketIndex).client;
|
||||||
if (parseInt(adjustedDepth as string) === 5) {
|
if (parseInt(adjustedDepth as string) === 5) {
|
||||||
redisL2 = await redisClient.client.get(
|
redisL2 = await redisClient.client.get(
|
||||||
`last_update_orderbook_perp_${normedMarketIndex}_depth_5`
|
`last_update_orderbook_perp_${normedMarketIndex}_depth_5`
|
||||||
@@ -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
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -470,7 +473,7 @@ const main = async () => {
|
|||||||
) {
|
) {
|
||||||
let redisL2: string;
|
let redisL2: string;
|
||||||
const redisClient =
|
const redisClient =
|
||||||
spotMarketRedisMap.get(normedMarketIndex).client;
|
spotMarketRedisMap.get(normedMarketIndex).client;
|
||||||
if (parseInt(adjustedDepth as string) === 5) {
|
if (parseInt(adjustedDepth as string) === 5) {
|
||||||
redisL2 = await redisClient.client.get(
|
redisL2 = await redisClient.client.get(
|
||||||
`last_update_orderbook_spot_${normedMarketIndex}_depth_5`
|
`last_update_orderbook_spot_${normedMarketIndex}_depth_5`
|
||||||
@@ -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
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user