From b164110c9262b6808843bda7db60d2903878a70b Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sat, 14 Jan 2023 16:57:37 +0300 Subject: vnext: disable SSE processing --- vnext/package-lock.json | 14 -------------- vnext/package.json | 1 - vnext/server/middleware/event.js | 17 ----------------- 3 files changed, 32 deletions(-) (limited to 'vnext') diff --git a/vnext/package-lock.json b/vnext/package-lock.json index 40be2828..3913bea8 100644 --- a/vnext/package-lock.json +++ b/vnext/package-lock.json @@ -17,7 +17,6 @@ "cors": "^2.8.5", "dayjs": "^1.11.7", "esbuild": "^0.16.17", - "eventsource": "^2.0.2", "evil-icons": "^1.10.1", "express": "^4.18.2", "ignore-styles": "^5.0.1", @@ -6793,14 +6792,6 @@ "node": ">=0.8.x" } }, - "node_modules/eventsource": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-2.0.2.tgz", - "integrity": "sha512-IzUmBGPR3+oUG9dUeXynyNmf91/3zUSJg1lCktzKw47OXuhco54U3r9B7O4XX+Rb1Itm9OZ2b0RkTs10bICOxA==", - "engines": { - "node": ">=12.0.0" - } - }, "node_modules/evil-icons": { "version": "1.10.1", "resolved": "https://registry.npmjs.org/evil-icons/-/evil-icons-1.10.1.tgz", @@ -22007,11 +21998,6 @@ "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", "peer": true }, - "eventsource": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-2.0.2.tgz", - "integrity": "sha512-IzUmBGPR3+oUG9dUeXynyNmf91/3zUSJg1lCktzKw47OXuhco54U3r9B7O4XX+Rb1Itm9OZ2b0RkTs10bICOxA==" - }, "evil-icons": { "version": "1.10.1", "resolved": "https://registry.npmjs.org/evil-icons/-/evil-icons-1.10.1.tgz", diff --git a/vnext/package.json b/vnext/package.json index 982764c2..fda3c5d2 100644 --- a/vnext/package.json +++ b/vnext/package.json @@ -57,7 +57,6 @@ "cors": "^2.8.5", "dayjs": "^1.11.7", "esbuild": "^0.16.17", - "eventsource": "^2.0.2", "evil-icons": "^1.10.1", "express": "^4.18.2", "ignore-styles": "^5.0.1", diff --git a/vnext/server/middleware/event.js b/vnext/server/middleware/event.js index deb974ee..838ea8b1 100644 --- a/vnext/server/middleware/event.js +++ b/vnext/server/middleware/event.js @@ -5,23 +5,6 @@ import { subscribers } from '../http'; import { sendNotification, buildNotification } from '../sender'; import debug from 'debug'; var log = debug('event'); -import config from 'config'; -import EventSource from 'eventsource'; - -const es = new EventSource(config.get('service.baseURL')+ '/api/events'); -es.addEventListener('msg', (msg) => { - log(msg.data); - processMessageEvent(JSON.parse(msg.data)); -}); -es.addEventListener('read', (msg) => { - log(msg); -}); -es.addEventListener('open', () => { - log('online'); -}); -es.onerror = (evt) => { - log(`err: ${JSON.stringify(evt)}`); -}; /** @type {number[]} */ const allSandboxIds = []; -- cgit v1.2.3