From aca8be448afe3ecd96c398f8d5c570159e05ebf6 Mon Sep 17 00:00:00 2001 From: Aleksey Konstantinov Date: Thu, 10 Oct 2024 20:18:05 +0300 Subject: [PATCH] ULMS-3378 Added stop condition for NATS manager --- package-lock.json | 4 ++-- package.json | 2 +- src/nats-manager.js | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 180afa8..c1aecc8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ulms/api-clients", - "version": "7.21.0", + "version": "7.22.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ulms/api-clients", - "version": "7.21.0", + "version": "7.22.0", "license": "MIT", "dependencies": { "axios": "1.6.2", diff --git a/package.json b/package.json index 8a15d9c..57e65af 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ulms/api-clients", - "version": "7.21.0", + "version": "7.22.0", "description": "JavaScript API clients for ULMS platform", "keywords": [], "homepage": "https://github.com/foxford/ulms-api-clients-js#readme", diff --git a/src/nats-manager.js b/src/nats-manager.js index 53ee78b..8760367 100644 --- a/src/nats-manager.js +++ b/src/nats-manager.js @@ -82,6 +82,10 @@ class NatsManager { // waiting 2 seconds between reconnections await sleep(2e3) } + + if (this.forcedStop) { + break + } } }