notification-processor 4.18.0 → 4.18.2
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.
|
@@ -67,14 +67,14 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
67
67
|
}
|
|
68
68
|
}, {
|
|
69
69
|
key: "uploadTrackingFile",
|
|
70
|
-
value: function uploadTrackingFile(_ref2,
|
|
70
|
+
value: function uploadTrackingFile(_ref2, executionStatus) {
|
|
71
71
|
var _this2 = this;
|
|
72
72
|
|
|
73
73
|
var id = _ref2.id,
|
|
74
74
|
notification = _ref2.notification,
|
|
75
75
|
error = _ref2.error;
|
|
76
76
|
|
|
77
|
-
return this._mapper(id, notification, error,
|
|
77
|
+
return this._mapper(id, notification, error, executionStatus).then(function (record) {
|
|
78
78
|
var __uploadToFirehose, uploadParams;
|
|
79
79
|
if (_.isEmpty(record)) {
|
|
80
80
|
return;
|
|
@@ -101,7 +101,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
101
101
|
}
|
|
102
102
|
}, {
|
|
103
103
|
key: "_mapper",
|
|
104
|
-
value: function _mapper(id, notification, err,
|
|
104
|
+
value: function _mapper(id, notification, err, executionStatus) {
|
|
105
105
|
var _this3 = this;
|
|
106
106
|
|
|
107
107
|
return Promise.method(this.sender.monitoringCenterFields.bind(this.sender))(notification).then(function (_ref3) {
|
|
@@ -127,7 +127,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
127
127
|
id: id,
|
|
128
128
|
executionId: id,
|
|
129
129
|
app: app || parseInt(_this3.clientId) || null,
|
|
130
|
-
type: eventType,
|
|
130
|
+
type: eventType || "service-bus",
|
|
131
131
|
company: companyId,
|
|
132
132
|
user: userId,
|
|
133
133
|
event: eventId,
|
|
@@ -149,7 +149,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
149
149
|
type: err && _.get(err, "type", "unknown"),
|
|
150
150
|
tags: _.get(err, "tags", [])
|
|
151
151
|
}),
|
|
152
|
-
status:
|
|
152
|
+
status: executionStatus,
|
|
153
153
|
resource: resource,
|
|
154
154
|
integration: _this3.app + "|" + (job || _this3.job),
|
|
155
155
|
// Generic app fields
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
nonRetryable: nonRetryable,
|
|
28
28
|
notificationApiUrl: notificationApiUrl
|
|
29
29
|
});
|
|
30
|
-
return function (it) {
|
|
31
|
-
return jobProcesor.process(it);
|
|
30
|
+
return function (it, context, executionId) {
|
|
31
|
+
return jobProcesor.process(it, context, executionId);
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
34
|
}).call(undefined);
|
|
@@ -61,12 +61,12 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|
|
61
61
|
|
|
62
62
|
_createClass(JobProcessor, [{
|
|
63
63
|
key: "process",
|
|
64
|
-
value: function process(notification) {
|
|
64
|
+
value: function process(notification, context, executionId) {
|
|
65
65
|
var _this2 = this;
|
|
66
66
|
|
|
67
67
|
boundMethodCheck(this, JobProcessor);
|
|
68
68
|
return this._ifJobIsNotStopped(notification.message, function () {
|
|
69
|
-
return _get(JobProcessor.prototype.__proto__ || Object.getPrototypeOf(JobProcessor.prototype), "process", _this2).call(_this2, notification).thenReturn();
|
|
69
|
+
return _get(JobProcessor.prototype.__proto__ || Object.getPrototypeOf(JobProcessor.prototype), "process", _this2).call(_this2, notification, context, executionId).thenReturn();
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
}, {
|