@5minds/node-red-contrib-processcube 1.8.4-develop-d81c9d-m7pcbct5 → 1.8.5-develop-e1e2dc-m7pcoei4

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.
@@ -178,17 +178,50 @@ module.exports = function (RED) {
178
178
  const msgCounter = Object.keys(this.started_external_tasks).length;
179
179
 
180
180
  if (this._subscribed === false) {
181
- this.status({ fill: 'red', shape: 'ring', text: `subscription failed (${msgCounter}).` })
181
+ this.status({ fill: 'red', shape: 'ring', text: `subscription failed (${msgCounter}).` });
182
+
183
+ RED.events.emit("processcube:healthcheck:update", {
184
+ nodeId: node.id,
185
+ status: 'NotOk',
186
+ nodeName: node.name,
187
+ nodeType: 'externaltask-input',
188
+ message: `subscription failed (${msgCounter}).`
189
+ });
182
190
  } else {
183
191
  if (msgCounter >= 1) {
184
192
  if (node._step) {
185
193
  this.status({ fill: 'green', shape: 'dot', text: `tasks(${msgCounter}) ->'${node._step}'.` });
194
+
195
+ RED.events.emit("processcube:healthcheck:update", {
196
+ nodeId: node.id,
197
+ status: 'Ok',
198
+ nodeName: node.name,
199
+ nodeType: 'externaltask-input',
200
+ message: `tasks(${msgCounter}) ->'${node._step}'.`
201
+ });
202
+
186
203
  } else {
187
204
  this.status({ fill: 'green', shape: 'dot', text: `tasks(${msgCounter}).` });
205
+
206
+ RED.events.emit("processcube:healthcheck:update", {
207
+ nodeId: node.id,
208
+ status: 'Ok',
209
+ nodeName: node.name,
210
+ nodeType: 'externaltask-input',
211
+ message: `tasks(${msgCounter}).`
212
+ });
188
213
  }
189
214
  this.log(`handling tasks ${msgCounter}.`);
190
215
  } else {
191
216
  this.status({ fill: 'blue', shape: 'ring', text: `subcribed.` });
217
+
218
+ RED.events.emit("processcube:healthcheck:update", {
219
+ nodeId: node.id,
220
+ status: 'Ok',
221
+ nodeName: node.name,
222
+ nodeType: 'externaltask-input',
223
+ message: `subcribed.`
224
+ });
192
225
  }
193
226
  }
194
227
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@5minds/node-red-contrib-processcube",
3
- "version": "1.8.4-develop-d81c9d-m7pcbct5",
3
+ "version": "1.8.5-develop-e1e2dc-m7pcoei4",
4
4
  "license": "MIT",
5
5
  "description": "Node-RED nodes for ProcessCube",
6
6
  "scripts": {