Merge pull request #64 from drift-labs/master

buffered amount threshold
This commit is contained in:
Nour Alharithi
2024-01-17 21:51:38 -08:00
committed by GitHub
3 changed files with 6 additions and 6 deletions

View File

@@ -6,7 +6,7 @@
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@coral-xyz/anchor": "^0.29.0", "@coral-xyz/anchor": "^0.29.0",
"@drift-labs/sdk": "2.54.0-beta.6", "@drift-labs/sdk": "2.55.0-beta.4",
"@opentelemetry/api": "^1.1.0", "@opentelemetry/api": "^1.1.0",
"@opentelemetry/auto-instrumentations-node": "^0.31.1", "@opentelemetry/auto-instrumentations-node": "^0.31.1",
"@opentelemetry/exporter-prometheus": "^0.31.0", "@opentelemetry/exporter-prometheus": "^0.31.0",

View File

@@ -103,7 +103,7 @@ async function main() {
const subscribers = channelSubscribers.get(subscribedChannel); const subscribers = channelSubscribers.get(subscribedChannel);
if (subscribers) { if (subscribers) {
subscribers.forEach((ws) => { subscribers.forEach((ws) => {
if (ws.readyState === WebSocket.OPEN && ws.bufferedAmount < 100) if (ws.readyState === WebSocket.OPEN && ws.bufferedAmount < 300000)
ws.send( ws.send(
JSON.stringify({ channel: subscribedChannel, data: message }) JSON.stringify({ channel: subscribedChannel, data: message })
); );

View File

@@ -115,10 +115,10 @@
enabled "2.0.x" enabled "2.0.x"
kuler "^2.0.0" kuler "^2.0.0"
"@drift-labs/sdk@2.54.0-beta.6": "@drift-labs/sdk@2.55.0-beta.4":
version "2.54.0-beta.6" version "2.55.0-beta.4"
resolved "https://registry.yarnpkg.com/@drift-labs/sdk/-/sdk-2.54.0-beta.6.tgz#917bcd6d32aa9c3d545ffb552f36f48ac324f44a" resolved "https://registry.yarnpkg.com/@drift-labs/sdk/-/sdk-2.55.0-beta.4.tgz#2a43dc1f15b323f891ab33797495dbcb6d9d214e"
integrity sha512-GXR/F0rjoEGwuY+tkQRZsY9obr9vWBHVBnfytmCXHpzsppEoPmXRwB2TKXQNb7Co7nyVj4fXt/yOO426ob0+0w== integrity sha512-9SFXsZRKYtk+OMFpWGN1L2GuicLqnUS7kveQmf6G8SVjsMrePo7udkfFJBThyfD7O1yBX4QiShBdZeIDTwsgHQ==
dependencies: dependencies:
"@coral-xyz/anchor" "0.28.1-beta.2" "@coral-xyz/anchor" "0.28.1-beta.2"
"@ellipsis-labs/phoenix-sdk" "^1.4.2" "@ellipsis-labs/phoenix-sdk" "^1.4.2"