teraslice 3.0.0-dev.5 → 3.0.0-dev.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import { nanoid } from 'nanoid';
2
2
  import { pDelay, Queue, isFunction, isEmpty, get, toNumber, isKey } from '@terascope/utils';
3
- import socketIOClient from 'socket.io-client';
4
- import socketIOServer from 'socket.io';
3
+ import { io as socketIOClient } from 'socket.io-client';
4
+ import { Server as socketIOServer } from 'socket.io';
5
5
  import { isProcessAssignment, ProcessAssignment } from '../../../../../../interfaces.js';
6
6
  // messages send to cluster_master
7
7
  const clusterMasterMessages = {
@@ -288,10 +288,11 @@ export class Messaging {
288
288
  serveClient: false,
289
289
  };
290
290
  if (server) {
291
- this.io = socketIOServer(server, opts);
291
+ this.io = new socketIOServer(server, opts);
292
292
  }
293
293
  else if (port) {
294
- this.io = socketIOServer(port, opts);
294
+ this.io = new socketIOServer(opts);
295
+ this.io.listen(port);
295
296
  }
296
297
  this._attachRoomsSocketIO();
297
298
  this.io.on('connection', (socket) => {
@@ -15,7 +15,6 @@ function getConnectors() {
15
15
  }
16
16
  export default {
17
17
  terafoundation: {
18
- environment: 'development',
19
18
  connectors: getConnectors()
20
19
  },
21
20
  teraslice: {
@@ -140,7 +140,7 @@ export const schema = {
140
140
  format: 'duration'
141
141
  },
142
142
  node_disconnect_timeout: {
143
- doc: 'time in milliseconds that the cluster will wait untill it drops that node from state and attempts to provision the lost workers',
143
+ doc: 'time in milliseconds that the cluster will wait until it drops that node from state and attempts to provision the lost workers',
144
144
  default: '5 minutes',
145
145
  format: 'duration'
146
146
  },
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter } from 'node:events';
2
2
  import { debugLogger } from '@terascope/utils';
3
- import Socket from 'socket.io';
3
+ import { Server as SocketServer } from 'socket.io';
4
4
  import { nodeMaster } from '../src/lib/cluster/node_master.js';
5
5
  process.env.assignment = 'node_master';
6
6
  describe('Node master', () => {
@@ -49,7 +49,7 @@ describe('Node master', () => {
49
49
  __test_job: JSON.stringify(jobJson),
50
50
  __test_assignment: 'worker'
51
51
  };
52
- const fakeClusterMaster = Socket({
52
+ const fakeClusterMaster = new SocketServer({
53
53
  path: '/native-clustering'
54
54
  });
55
55
  fakeClusterMaster.on('connection', (socket) => {
@@ -75,7 +75,6 @@ const newSysConfig = (options) => {
75
75
  const { clusterName = 'test-teraslice-cluster', timeout = 3000, actionTimeout = 2000, shutdownTimeout = 4000, assetDir, clusterMasterPort, log_level_terafoundation = 'info', } = options;
76
76
  return {
77
77
  terafoundation: {
78
- environment: 'development',
79
78
  log_level: log_level_terafoundation,
80
79
  connectors: {
81
80
  'elasticsearch-next': {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "teraslice",
3
3
  "displayName": "Teraslice",
4
- "version": "3.0.0-dev.5",
4
+ "version": "3.0.0-dev.7",
5
5
  "description": "Distributed computing platform for processing JSON data",
6
6
  "homepage": "https://github.com/terascope/teraslice#readme",
7
7
  "bugs": {
@@ -39,11 +39,11 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@kubernetes/client-node": "~1.3.0",
42
- "@terascope/elasticsearch-api": "~5.0.0-dev.5",
43
- "@terascope/job-components": "~2.0.0-dev.5",
44
- "@terascope/teraslice-messaging": "~2.0.0-dev.5",
45
- "@terascope/types": "~2.0.0-dev.5",
46
- "@terascope/utils": "~2.0.0-dev.5",
42
+ "@terascope/elasticsearch-api": "~5.0.0-dev.6",
43
+ "@terascope/job-components": "~2.0.0-dev.6",
44
+ "@terascope/teraslice-messaging": "~2.0.0-dev.7",
45
+ "@terascope/types": "~2.0.0-dev.6",
46
+ "@terascope/utils": "~2.0.0-dev.6",
47
47
  "async-mutex": "~0.5.0",
48
48
  "barbe": "~3.0.17",
49
49
  "body-parser": "~2.2.0",
@@ -59,13 +59,13 @@
59
59
  "ms": "~2.1.3",
60
60
  "nanoid": "~5.1.5",
61
61
  "semver": "~7.7.2",
62
- "socket.io": "~1.7.4",
63
- "socket.io-client": "~1.7.4",
64
- "terafoundation": "~2.0.0-dev.5",
62
+ "socket.io": "~4.8.1",
63
+ "socket.io-client": "~4.8.1",
64
+ "terafoundation": "~2.0.0-dev.6",
65
65
  "uuid": "~13.0.0"
66
66
  },
67
67
  "devDependencies": {
68
- "@terascope/opensearch-client": "~2.0.0-dev.5",
68
+ "@terascope/opensearch-client": "~2.0.0-dev.6",
69
69
  "@types/archiver": "~6.0.3",
70
70
  "@types/express": "~5.0.3",
71
71
  "@types/gc-stats": "~1.4.3",