Merge branch 'master' into staging
merge master
This commit is contained in:
@@ -941,7 +941,7 @@ const main = async () => {
|
||||
let l2Formatted: any;
|
||||
if (useRedis) {
|
||||
if (
|
||||
marketType === 'perp' &&
|
||||
!isSpot &&
|
||||
normedParam['includeVamm'].toLowerCase() === 'true' &&
|
||||
normedParam['includeOracle'].toLowerCase() === 'true' &&
|
||||
!normedParam['grouping']
|
||||
@@ -966,7 +966,7 @@ const main = async () => {
|
||||
l2Formatted = parsedRedisL2;
|
||||
}
|
||||
} else if (
|
||||
marketType === 'spot' &&
|
||||
isSpot &&
|
||||
normedParam['includePhoenix'].toLowerCase() === 'true' &&
|
||||
normedParam['includeSerum'].toLowerCase() === 'true' &&
|
||||
!normedParam['grouping']
|
||||
|
||||
@@ -257,6 +257,15 @@ async function main() {
|
||||
ws.on('error', (error) => {
|
||||
console.error('Socket error:', error);
|
||||
});
|
||||
|
||||
// Set interval to send heartbeat every 5 seconds
|
||||
setInterval(() => {
|
||||
ws.send(
|
||||
JSON.stringify({
|
||||
channel: 'heartbeat',
|
||||
})
|
||||
);
|
||||
}, 5000);
|
||||
});
|
||||
|
||||
server.listen(WS_PORT, () => {
|
||||
|
||||
Reference in New Issue
Block a user