@hotmeshio/hotmesh 0.0.47 → 0.0.48

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@hotmeshio/hotmesh",
3
- "version": "0.0.47",
3
+ "version": "0.0.48",
4
4
  "description": "Unbreakable Workflows",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -41,6 +41,7 @@ declare class EngineService {
41
41
  jobCallbacks: Record<string, JobMessageCallback>;
42
42
  reporting: boolean;
43
43
  jobId: number;
44
+ inited: string;
44
45
  static init(namespace: string, appId: string, guid: string, config: HotMeshConfig, logger: ILogger): Promise<EngineService>;
45
46
  verifyEngineFields(config: HotMeshConfig): void;
46
47
  initStoreChannel(store: RedisClient): Promise<void>;
@@ -44,6 +44,7 @@ class EngineService {
44
44
  instance.router.consumeMessages(instance.stream.mintKey(key_1.KeyType.STREAMS, { appId: instance.appId }), 'ENGINE', instance.guid, instance.processStreamMessage.bind(instance));
45
45
  instance.taskService = new task_1.TaskService(instance.store, logger);
46
46
  instance.exporter = new exporter_1.ExporterService(instance.appId, instance.store, logger);
47
+ instance.inited = (0, utils_1.formatISODate)(new Date());
47
48
  return instance;
48
49
  }
49
50
  }
@@ -107,6 +107,10 @@ class QuorumService {
107
107
  stream,
108
108
  counts: this.engine.router.counts,
109
109
  timestamp: (0, utils_1.formatISODate)(new Date()),
110
+ inited: this.engine.inited,
111
+ throttle: this.engine.router.throttle,
112
+ reclaimDelay: this.engine.router.reclaimDelay,
113
+ reclaimCount: this.engine.router.reclaimCount,
110
114
  system: await (0, utils_1.getSystemHealth)(),
111
115
  };
112
116
  }
@@ -18,6 +18,7 @@ declare class WorkerService {
18
18
  router: Router | null;
19
19
  logger: ILogger;
20
20
  reporting: boolean;
21
+ inited: string;
21
22
  static init(namespace: string, appId: string, guid: string, config: HotMeshConfig, logger: ILogger): Promise<WorkerService[]>;
22
23
  verifyWorkerFields(worker: HotMeshWorker): void;
23
24
  initStoreChannel(service: WorkerService, store: RedisClient): Promise<void>;
@@ -38,6 +38,7 @@ class WorkerService {
38
38
  service.router = service.initRouter(worker, logger);
39
39
  const key = service.stream.mintKey(key_1.KeyType.STREAMS, { appId: service.appId, topic: worker.topic });
40
40
  await service.router.consumeMessages(key, 'WORKER', service.guid, worker.callback);
41
+ service.inited = (0, utils_1.formatISODate)(new Date());
41
42
  services.push(service);
42
43
  }
43
44
  }
@@ -116,6 +117,10 @@ class WorkerService {
116
117
  stream: this.stream.mintKey(key_1.KeyType.STREAMS, params),
117
118
  counts: this.router.counts,
118
119
  timestamp: (0, utils_1.formatISODate)(new Date()),
120
+ inited: this.inited,
121
+ throttle: this.router.throttle,
122
+ reclaimDelay: this.router.reclaimDelay,
123
+ reclaimCount: this.router.reclaimCount,
119
124
  system: await (0, utils_1.getSystemHealth)(),
120
125
  };
121
126
  }
@@ -39,7 +39,11 @@ export interface QuorumProfile {
39
39
  stream?: string;
40
40
  stream_depth?: number;
41
41
  counts?: Record<string, number>;
42
+ inited?: string;
42
43
  timestamp?: string;
44
+ throttle?: number;
45
+ reclaimDelay?: number;
46
+ reclaimCount?: number;
43
47
  system?: SystemHealth;
44
48
  }
45
49
  export interface PingMessage {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hotmeshio/hotmesh",
3
- "version": "0.0.47",
3
+ "version": "0.0.48",
4
4
  "description": "Unbreakable Workflows",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -98,6 +98,7 @@ class EngineService {
98
98
  jobCallbacks: Record<string, JobMessageCallback> = {};
99
99
  reporting = false;
100
100
  jobId = 1;
101
+ inited: string;
101
102
 
102
103
  static async init(namespace: string, appId: string, guid: string, config: HotMeshConfig, logger: ILogger): Promise<EngineService> {
103
104
  if (config.engine) {
@@ -133,6 +134,7 @@ class EngineService {
133
134
  instance.store,
134
135
  logger,
135
136
  );
137
+ instance.inited = formatISODate(new Date());
136
138
  return instance;
137
139
  }
138
140
  }
@@ -158,6 +158,10 @@ class QuorumService {
158
158
  stream,
159
159
  counts: this.engine.router.counts,
160
160
  timestamp: formatISODate(new Date()),
161
+ inited: this.engine.inited,
162
+ throttle: this.engine.router.throttle,
163
+ reclaimDelay: this.engine.router.reclaimDelay,
164
+ reclaimCount: this.engine.router.reclaimCount,
161
165
  system: await getSystemHealth(),
162
166
  };
163
167
  }
@@ -34,6 +34,7 @@ class WorkerService {
34
34
  router: Router | null;
35
35
  logger: ILogger;
36
36
  reporting = false;
37
+ inited: string;
37
38
 
38
39
  static async init(
39
40
  namespace: string,
@@ -76,6 +77,7 @@ class WorkerService {
76
77
  service.guid,
77
78
  worker.callback
78
79
  );
80
+ service.inited = formatISODate(new Date());
79
81
  services.push(service);
80
82
  }
81
83
  }
@@ -176,6 +178,10 @@ class WorkerService {
176
178
  stream: this.stream.mintKey(KeyType.STREAMS, params),
177
179
  counts: this.router.counts,
178
180
  timestamp: formatISODate(new Date()),
181
+ inited: this.inited,
182
+ throttle: this.router.throttle,
183
+ reclaimDelay: this.router.reclaimDelay,
184
+ reclaimCount: this.router.reclaimCount,
179
185
  system: await getSystemHealth(),
180
186
  };
181
187
  }
package/types/quorum.ts CHANGED
@@ -44,7 +44,11 @@ export interface QuorumProfile {
44
44
  stream?: string;
45
45
  stream_depth?: number;
46
46
  counts?: Record<string, number>;
47
+ inited?: string;
47
48
  timestamp?: string;
49
+ throttle?: number;
50
+ reclaimDelay?: number;
51
+ reclaimCount?: number;
48
52
  system?: SystemHealth;
49
53
  }
50
54