@golemio/flow 1.3.3-dev.1506985292 → 1.3.3-rc.1510392518
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.
- package/dist/integration-engine/queueDefinitions.js +0 -57
- package/dist/integration-engine/queueDefinitions.js.map +1 -1
- package/docs/asyncapi.yaml +68 -70
- package/package.json +1 -1
- package/dist/integration-engine/FlowWorkerTest.d.ts +0 -29
- package/dist/integration-engine/FlowWorkerTest.js +0 -469
- package/dist/integration-engine/FlowWorkerTest.js.map +0 -1
|
@@ -5,7 +5,6 @@ const config_1 = require("@golemio/core/dist/integration-engine/config");
|
|
|
5
5
|
const index_1 = require("../schema-definitions/index");
|
|
6
6
|
const FlowWorker_1 = require("./FlowWorker");
|
|
7
7
|
const CountersWorker_1 = require("./CountersWorker");
|
|
8
|
-
const FlowWorkerTest_1 = require("./FlowWorkerTest");
|
|
9
8
|
const queueDefinitions = [
|
|
10
9
|
{
|
|
11
10
|
name: index_1.Flow.detections.name,
|
|
@@ -99,62 +98,6 @@ const queueDefinitions = [
|
|
|
99
98
|
},
|
|
100
99
|
],
|
|
101
100
|
},
|
|
102
|
-
{
|
|
103
|
-
name: index_1.Flow.detections.name + "-TEST",
|
|
104
|
-
queuePrefix: config_1.config.RABBIT_EXCHANGE_NAME + "." + index_1.Flow.detections.name.toLowerCase() + "-TEST",
|
|
105
|
-
queues: [
|
|
106
|
-
{
|
|
107
|
-
name: "refreshCubes",
|
|
108
|
-
options: {
|
|
109
|
-
deadLetterExchange: config_1.config.RABBIT_EXCHANGE_NAME,
|
|
110
|
-
deadLetterRoutingKey: "dead",
|
|
111
|
-
messageTtl: 23 * 60 * 60 * 1000, // 23 hours
|
|
112
|
-
},
|
|
113
|
-
worker: FlowWorkerTest_1.FlowWorkerTest,
|
|
114
|
-
workerMethod: "refreshCubes",
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
name: "getAnalytics",
|
|
118
|
-
options: {
|
|
119
|
-
deadLetterExchange: config_1.config.RABBIT_EXCHANGE_NAME,
|
|
120
|
-
deadLetterRoutingKey: "dead",
|
|
121
|
-
messageTtl: 23 * 60 * 60 * 1000, // 23 hours
|
|
122
|
-
},
|
|
123
|
-
worker: FlowWorkerTest_1.FlowWorkerTest,
|
|
124
|
-
workerMethod: "getAnalytics",
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
name: "getSinks",
|
|
128
|
-
options: {
|
|
129
|
-
deadLetterExchange: config_1.config.RABBIT_EXCHANGE_NAME,
|
|
130
|
-
deadLetterRoutingKey: "dead",
|
|
131
|
-
messageTtl: 23 * 60 * 60 * 1000, // 23 hours
|
|
132
|
-
},
|
|
133
|
-
worker: FlowWorkerTest_1.FlowWorkerTest,
|
|
134
|
-
workerMethod: "getSinks",
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
name: "getSinksHistoryPayloads",
|
|
138
|
-
options: {
|
|
139
|
-
deadLetterExchange: config_1.config.RABBIT_EXCHANGE_NAME,
|
|
140
|
-
deadLetterRoutingKey: "dead",
|
|
141
|
-
messageTtl: 23 * 60 * 60 * 1000, // 23 hours
|
|
142
|
-
},
|
|
143
|
-
worker: FlowWorkerTest_1.FlowWorkerTest,
|
|
144
|
-
workerMethod: "getSinksHistoryPayloads",
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
name: "getSinksHistory",
|
|
148
|
-
options: {
|
|
149
|
-
deadLetterExchange: config_1.config.RABBIT_EXCHANGE_NAME,
|
|
150
|
-
deadLetterRoutingKey: "dead",
|
|
151
|
-
messageTtl: 23 * 60 * 60 * 1000, // 23 hours
|
|
152
|
-
},
|
|
153
|
-
worker: FlowWorkerTest_1.FlowWorkerTest,
|
|
154
|
-
workerMethod: "getSinksHistory",
|
|
155
|
-
},
|
|
156
|
-
],
|
|
157
|
-
},
|
|
158
101
|
];
|
|
159
102
|
exports.queueDefinitions = queueDefinitions;
|
|
160
103
|
//# sourceMappingURL=queueDefinitions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queueDefinitions.js","sourceRoot":"","sources":["../../src/integration-engine/queueDefinitions.ts"],"names":[],"mappings":";;;AAAA,yEAAsE;AAEtE,uDAAkC;AAClC,6CAA4C;AAC5C,qDAAkD;
|
|
1
|
+
{"version":3,"file":"queueDefinitions.js","sourceRoot":"","sources":["../../src/integration-engine/queueDefinitions.ts"],"names":[],"mappings":";;;AAAA,yEAAsE;AAEtE,uDAAkC;AAClC,6CAA4C;AAC5C,qDAAkD;AAElD,MAAM,gBAAgB,GAAuB;IACzC;QACI,IAAI,EAAE,YAAI,CAAC,UAAU,CAAC,IAAI;QAC1B,WAAW,EAAE,eAAM,CAAC,oBAAoB,GAAG,GAAG,GAAG,YAAI,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE;QACnF,MAAM,EAAE;YACJ;gBACI,IAAI,EAAE,cAAc;gBACpB,OAAO,EAAE;oBACL,kBAAkB,EAAE,eAAM,CAAC,oBAAoB;oBAC/C,oBAAoB,EAAE,MAAM;oBAC5B,UAAU,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,WAAW;iBAC/C;gBACD,MAAM,EAAE,uBAAU;gBAClB,YAAY,EAAE,cAAc;aAC/B;YACD;gBACI,IAAI,EAAE,cAAc;gBACpB,OAAO,EAAE;oBACL,kBAAkB,EAAE,eAAM,CAAC,oBAAoB;oBAC/C,oBAAoB,EAAE,MAAM;oBAC5B,UAAU,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,WAAW;iBAC/C;gBACD,MAAM,EAAE,uBAAU;gBAClB,YAAY,EAAE,cAAc;aAC/B;YACD;gBACI,IAAI,EAAE,UAAU;gBAChB,OAAO,EAAE;oBACL,kBAAkB,EAAE,eAAM,CAAC,oBAAoB;oBAC/C,oBAAoB,EAAE,MAAM;oBAC5B,UAAU,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,EA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aAC5C;YACD;gBACI,IAAI,EAAE,kBAAkB;gBACxB,OAAO,EAAE;oBACL,kBAAkB,EAAE,eAAM,CAAC,oBAAoB;oBAC/C,oBAAoB,EAAE,MAAM;oBAC5B,UAAU,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,WAAW;iBAC/C;gBACD,MAAM,EAAE,+BAAc;gBACtB,YAAY,EAAE,kBAAkB;aACnC;SACJ;KACJ;CACJ,CAAC;AAEO,4CAAgB"}
|
package/docs/asyncapi.yaml
CHANGED
|
@@ -4,7 +4,7 @@ info:
|
|
|
4
4
|
version: 1.0.0
|
|
5
5
|
description: Flow module saves data about count of a pedestrian, cyclist and othe object crossings
|
|
6
6
|
channels:
|
|
7
|
-
refreshCubes:
|
|
7
|
+
flow.refreshCubes:
|
|
8
8
|
address: dataplatform.flowmeasurements.refreshCubes
|
|
9
9
|
description: updates data about cubes and for each create new message to queue getAnalytics
|
|
10
10
|
bindings:
|
|
@@ -14,8 +14,8 @@ channels:
|
|
|
14
14
|
durable: true
|
|
15
15
|
messages:
|
|
16
16
|
empty:
|
|
17
|
-
$ref: "#/components/messages/refreshCubesMessage"
|
|
18
|
-
getAnalytics:
|
|
17
|
+
$ref: "#/components/messages/flow.refreshCubesMessage"
|
|
18
|
+
flow.getAnalytics:
|
|
19
19
|
address: dataplatform.flowmeasurements.getAnalytics
|
|
20
20
|
description: get analytics for cubes
|
|
21
21
|
bindings:
|
|
@@ -25,8 +25,8 @@ channels:
|
|
|
25
25
|
durable: true
|
|
26
26
|
messages:
|
|
27
27
|
getAnalyticsMessage:
|
|
28
|
-
$ref: "#/components/messages/getAnalyticsMessage"
|
|
29
|
-
getSinks:
|
|
28
|
+
$ref: "#/components/messages/flow.getAnalyticsMessage"
|
|
29
|
+
flow.getSinks:
|
|
30
30
|
address: dataplatform.flowmeasurements.getSinks
|
|
31
31
|
description: get sinks for cubes
|
|
32
32
|
bindings:
|
|
@@ -36,8 +36,8 @@ channels:
|
|
|
36
36
|
durable: true
|
|
37
37
|
messages:
|
|
38
38
|
getSinksMessage:
|
|
39
|
-
$ref: "#/components/messages/getSinksMessage"
|
|
40
|
-
getSinksHistory:
|
|
39
|
+
$ref: "#/components/messages/flow.getSinksMessage"
|
|
40
|
+
flow.getSinksHistory:
|
|
41
41
|
address: dataplatform.flowmeasurements.getSinksHistory
|
|
42
42
|
description: get sinks history for cubes
|
|
43
43
|
bindings:
|
|
@@ -47,8 +47,8 @@ channels:
|
|
|
47
47
|
durable: true
|
|
48
48
|
messages:
|
|
49
49
|
getSinksHistoryMessage:
|
|
50
|
-
$ref: "#/components/messages/getSinksHistoryMessage"
|
|
51
|
-
getSinksHistoryPayloads:
|
|
50
|
+
$ref: "#/components/messages/flow.getSinksHistoryMessage"
|
|
51
|
+
flow.getSinksHistoryPayloads:
|
|
52
52
|
address: dataplatform.flowmeasurements.getSinksHistoryPayloads
|
|
53
53
|
description: get sinks history payloads for cubes
|
|
54
54
|
bindings:
|
|
@@ -58,8 +58,8 @@ channels:
|
|
|
58
58
|
durable: true
|
|
59
59
|
messages:
|
|
60
60
|
getSinksHistoryPayloads:
|
|
61
|
-
$ref: "#/components/messages/getSinksHistoryPayloads"
|
|
62
|
-
refreshMatViewPedestriansDetectApi:
|
|
61
|
+
$ref: "#/components/messages/flow.getSinksHistoryPayloads"
|
|
62
|
+
flow.refreshMatViewPedestriansDetectApi:
|
|
63
63
|
address: dataplatform.flowmeasurements.refreshMatViewPedestriansDetectApi
|
|
64
64
|
description: start database procedure update_detections_data to insert data to table pedestrians_detections_api
|
|
65
65
|
bindings:
|
|
@@ -69,8 +69,8 @@ channels:
|
|
|
69
69
|
durable: true
|
|
70
70
|
messages:
|
|
71
71
|
empty:
|
|
72
|
-
$ref: "#/components/messages/
|
|
73
|
-
refreshEcoCounterDataInDB:
|
|
72
|
+
$ref: "#/components/messages/emptyMessage"
|
|
73
|
+
flow.refreshEcoCounterDataInDB:
|
|
74
74
|
address: dataplatform.counters.refreshEcoCounterDataInDB
|
|
75
75
|
description: updates data in database tables counters_directions and counters_locations and sends message to queue updateEcoCounter
|
|
76
76
|
bindings:
|
|
@@ -80,8 +80,8 @@ channels:
|
|
|
80
80
|
durable: true
|
|
81
81
|
messages:
|
|
82
82
|
empty:
|
|
83
|
-
$ref: "#/components/messages/
|
|
84
|
-
updateEcoCounter:
|
|
83
|
+
$ref: "#/components/messages/emptyMessage"
|
|
84
|
+
flow.updateEcoCounter:
|
|
85
85
|
address: dataplatform.counters.updateEcoCounter
|
|
86
86
|
description: save pedestrian data in database table counters_detections
|
|
87
87
|
bindings:
|
|
@@ -91,75 +91,73 @@ channels:
|
|
|
91
91
|
durable: true
|
|
92
92
|
messages:
|
|
93
93
|
updateEcoCounterMessage:
|
|
94
|
-
$ref: "#/components/messages/updateEcoCounterMessage"
|
|
94
|
+
$ref: "#/components/messages/flow.updateEcoCounterMessage"
|
|
95
95
|
operations:
|
|
96
|
-
refreshCubes:
|
|
96
|
+
flow.refreshCubes:
|
|
97
97
|
action: "send"
|
|
98
98
|
channel:
|
|
99
|
-
$ref: "#/channels/refreshCubes"
|
|
100
|
-
getAnalytics:
|
|
99
|
+
$ref: "#/channels/flow.refreshCubes"
|
|
100
|
+
flow.getAnalytics:
|
|
101
101
|
action: "send"
|
|
102
102
|
channel:
|
|
103
|
-
$ref: "#/channels/getAnalytics"
|
|
104
|
-
getSinks:
|
|
103
|
+
$ref: "#/channels/flow.getAnalytics"
|
|
104
|
+
flow.getSinks:
|
|
105
105
|
action: "send"
|
|
106
106
|
channel:
|
|
107
|
-
$ref: "#/channels/getSinks"
|
|
108
|
-
getSinksHistory:
|
|
107
|
+
$ref: "#/channels/flow.getSinks"
|
|
108
|
+
flow.getSinksHistory:
|
|
109
109
|
action: "send"
|
|
110
110
|
channel:
|
|
111
|
-
$ref: "#/channels/getSinksHistory"
|
|
112
|
-
getSinksHistoryPayloads:
|
|
111
|
+
$ref: "#/channels/flow.getSinksHistory"
|
|
112
|
+
flow.getSinksHistoryPayloads:
|
|
113
113
|
action: "send"
|
|
114
114
|
channel:
|
|
115
|
-
$ref: "#/channels/getSinksHistoryPayloads"
|
|
116
|
-
refreshMatViewPedestriansDetectApi:
|
|
115
|
+
$ref: "#/channels/flow.getSinksHistoryPayloads"
|
|
116
|
+
flow.refreshMatViewPedestriansDetectApi:
|
|
117
117
|
action: "send"
|
|
118
118
|
channel:
|
|
119
|
-
$ref: "#/channels/refreshMatViewPedestriansDetectApi"
|
|
120
|
-
refreshEcoCounterDataInDB:
|
|
119
|
+
$ref: "#/channels/flow.refreshMatViewPedestriansDetectApi"
|
|
120
|
+
flow.refreshEcoCounterDataInDB:
|
|
121
121
|
action: "send"
|
|
122
122
|
channel:
|
|
123
|
-
$ref: "#/channels/refreshEcoCounterDataInDB"
|
|
124
|
-
updateEcoCounter:
|
|
123
|
+
$ref: "#/channels/flow.refreshEcoCounterDataInDB"
|
|
124
|
+
flow.updateEcoCounter:
|
|
125
125
|
action: "send"
|
|
126
126
|
channel:
|
|
127
|
-
$ref: "#/channels/updateEcoCounter"
|
|
127
|
+
$ref: "#/channels/flow.updateEcoCounter"
|
|
128
128
|
components:
|
|
129
129
|
messages:
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
additionalProperties: false
|
|
134
|
-
refreshCubesMessage:
|
|
130
|
+
emptyMessage:
|
|
131
|
+
title: Empty message
|
|
132
|
+
flow.refreshCubesMessage:
|
|
135
133
|
payload:
|
|
136
134
|
oneOf:
|
|
137
|
-
- $ref: "#/components/schemas/refreshCubesMessageArray"
|
|
138
|
-
- $ref: "#/components/schemas/refreshCubesMessage"
|
|
139
|
-
getAnalyticsMessage:
|
|
135
|
+
- $ref: "#/components/schemas/flow.refreshCubesMessageArray"
|
|
136
|
+
- $ref: "#/components/schemas/flow.refreshCubesMessage"
|
|
137
|
+
flow.getAnalyticsMessage:
|
|
140
138
|
payload:
|
|
141
|
-
$ref: "#/components/schemas/getAnalyticsMessage"
|
|
142
|
-
getSinksMessage:
|
|
139
|
+
$ref: "#/components/schemas/flow.getAnalyticsMessage"
|
|
140
|
+
flow.getSinksMessage:
|
|
143
141
|
payload:
|
|
144
|
-
$ref: "#/components/schemas/getSinksMessage"
|
|
145
|
-
getSinksHistoryMessage:
|
|
142
|
+
$ref: "#/components/schemas/flow.getSinksMessage"
|
|
143
|
+
flow.getSinksHistoryMessage:
|
|
146
144
|
payload:
|
|
147
|
-
$ref: "#/components/schemas/getSinksHistoryMessage"
|
|
148
|
-
getSinksHistoryPayloads:
|
|
145
|
+
$ref: "#/components/schemas/flow.getSinksHistoryMessage"
|
|
146
|
+
flow.getSinksHistoryPayloads:
|
|
149
147
|
payload:
|
|
150
|
-
$ref: "#/components/schemas/getSinksHistoryPayloads"
|
|
151
|
-
updateEcoCounterMessage:
|
|
148
|
+
$ref: "#/components/schemas/flow.getSinksHistoryPayloads"
|
|
149
|
+
flow.updateEcoCounterMessage:
|
|
152
150
|
payload:
|
|
153
|
-
$ref: "#/components/schemas/updateEcoCounterMessage"
|
|
151
|
+
$ref: "#/components/schemas/flow.updateEcoCounterMessage"
|
|
154
152
|
schemas:
|
|
155
|
-
IHistoryIntervalArr:
|
|
153
|
+
flow.IHistoryIntervalArr:
|
|
156
154
|
type: array
|
|
157
155
|
items:
|
|
158
156
|
type: array
|
|
159
157
|
items:
|
|
160
158
|
type: number
|
|
161
159
|
description: contains 2 numbers, first is from, second is to formatted as unix timestamp
|
|
162
|
-
IAnalyticInfo:
|
|
160
|
+
flow.IAnalyticInfo:
|
|
163
161
|
type: object
|
|
164
162
|
properties:
|
|
165
163
|
id:
|
|
@@ -174,7 +172,7 @@ components:
|
|
|
174
172
|
type: string
|
|
175
173
|
description: sequence number of analytic
|
|
176
174
|
example: "88"
|
|
177
|
-
ICubeInfo:
|
|
175
|
+
flow.ICubeInfo:
|
|
178
176
|
type: object
|
|
179
177
|
properties:
|
|
180
178
|
id:
|
|
@@ -187,10 +185,10 @@ components:
|
|
|
187
185
|
example: "101378 Karlova x Křižovnická"
|
|
188
186
|
historyIntervalsArr:
|
|
189
187
|
oneOf:
|
|
190
|
-
- $ref: "#/components/schemas/IHistoryIntervalArr"
|
|
188
|
+
- $ref: "#/components/schemas/flow.IHistoryIntervalArr"
|
|
191
189
|
- type: "null"
|
|
192
190
|
additionalProperties: false
|
|
193
|
-
refreshCubesMessage:
|
|
191
|
+
flow.refreshCubesMessage:
|
|
194
192
|
type: object
|
|
195
193
|
properties:
|
|
196
194
|
from:
|
|
@@ -200,22 +198,22 @@ components:
|
|
|
200
198
|
type: string
|
|
201
199
|
description: datetime to which the data should be refreshed
|
|
202
200
|
additionalProperties: false
|
|
203
|
-
refreshCubesMessageArray:
|
|
201
|
+
flow.refreshCubesMessageArray:
|
|
204
202
|
type: array
|
|
205
203
|
items:
|
|
206
|
-
$ref: "#/components/schemas/refreshCubesMessage"
|
|
207
|
-
getAnalyticsMessage:
|
|
204
|
+
$ref: "#/components/schemas/flow.refreshCubesMessage"
|
|
205
|
+
flow.getAnalyticsMessage:
|
|
208
206
|
type: object
|
|
209
|
-
$ref: "#/components/schemas/ICubeInfo"
|
|
210
|
-
getSinksHistoryMessage:
|
|
207
|
+
$ref: "#/components/schemas/flow.ICubeInfo"
|
|
208
|
+
flow.getSinksHistoryMessage:
|
|
211
209
|
type: object
|
|
212
210
|
properties:
|
|
213
211
|
analytic:
|
|
214
212
|
type: object
|
|
215
|
-
$ref: "#/components/schemas/IAnalyticInfo"
|
|
213
|
+
$ref: "#/components/schemas/flow.IAnalyticInfo"
|
|
216
214
|
cube:
|
|
217
215
|
type: object
|
|
218
|
-
$ref: "#/components/schemas/ICubeInfo"
|
|
216
|
+
$ref: "#/components/schemas/flow.ICubeInfo"
|
|
219
217
|
payload:
|
|
220
218
|
type: object
|
|
221
219
|
properties:
|
|
@@ -243,29 +241,29 @@ components:
|
|
|
243
241
|
type: string
|
|
244
242
|
example: "distribution"
|
|
245
243
|
additionalProperties: false
|
|
246
|
-
getSinksMessage:
|
|
244
|
+
flow.getSinksMessage:
|
|
247
245
|
type: object
|
|
248
246
|
properties:
|
|
249
247
|
analytic:
|
|
250
248
|
type: object
|
|
251
|
-
$ref: "#/components/schemas/IAnalyticInfo"
|
|
249
|
+
$ref: "#/components/schemas/flow.IAnalyticInfo"
|
|
252
250
|
cube:
|
|
253
251
|
type: object
|
|
254
|
-
$ref: "#/components/schemas/ICubeInfo"
|
|
252
|
+
$ref: "#/components/schemas/flow.ICubeInfo"
|
|
255
253
|
historyIntervalsArr:
|
|
256
254
|
oneOf:
|
|
257
|
-
- $ref: "#/components/schemas/IHistoryIntervalArr"
|
|
255
|
+
- $ref: "#/components/schemas/flow.IHistoryIntervalArr"
|
|
258
256
|
- type: "null"
|
|
259
257
|
additionalProperties: false
|
|
260
|
-
getSinksHistoryPayloads:
|
|
258
|
+
flow.getSinksHistoryPayloads:
|
|
261
259
|
type: object
|
|
262
260
|
properties:
|
|
263
261
|
analytic:
|
|
264
262
|
type: object
|
|
265
|
-
$ref: "#/components/schemas/IAnalyticInfo"
|
|
263
|
+
$ref: "#/components/schemas/flow.IAnalyticInfo"
|
|
266
264
|
cube:
|
|
267
265
|
type: object
|
|
268
|
-
$ref: "#/components/schemas/ICubeInfo"
|
|
266
|
+
$ref: "#/components/schemas/flow.ICubeInfo"
|
|
269
267
|
sinks:
|
|
270
268
|
type: array
|
|
271
269
|
items:
|
|
@@ -304,10 +302,10 @@ components:
|
|
|
304
302
|
example: "distribution"
|
|
305
303
|
historyIntervalsArr:
|
|
306
304
|
oneOf:
|
|
307
|
-
- $ref: "#/components/schemas/IHistoryIntervalArr"
|
|
305
|
+
- $ref: "#/components/schemas/flow.IHistoryIntervalArr"
|
|
308
306
|
- type: "null"
|
|
309
307
|
additionalProperties: false
|
|
310
|
-
updateEcoCounterMessage:
|
|
308
|
+
flow.updateEcoCounterMessage:
|
|
311
309
|
type: object
|
|
312
310
|
properties:
|
|
313
311
|
location_id:
|
package/package.json
CHANGED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { BaseWorker } from "@golemio/core/dist/integration-engine/workers";
|
|
2
|
-
/**
|
|
3
|
-
* Temporary worker for testing purposes
|
|
4
|
-
*/
|
|
5
|
-
export declare class FlowWorkerTest extends BaseWorker {
|
|
6
|
-
private static testSchema;
|
|
7
|
-
private test_url;
|
|
8
|
-
private cubesDataSource;
|
|
9
|
-
private analyticsDataSource;
|
|
10
|
-
private sinksDataSource;
|
|
11
|
-
private sinksHistoryDataSource;
|
|
12
|
-
private flowCubesModel;
|
|
13
|
-
private flowMeasurementModel;
|
|
14
|
-
private flowODMeasurementModel;
|
|
15
|
-
private flowSinksModel;
|
|
16
|
-
private queuePrefix;
|
|
17
|
-
constructor();
|
|
18
|
-
private getHistoryIntervalFromMsg;
|
|
19
|
-
refreshCubes: (msg: any) => Promise<void>;
|
|
20
|
-
getAnalytics: (msg: any) => Promise<void>;
|
|
21
|
-
getSinks: (msg: any) => Promise<void>;
|
|
22
|
-
getSinksHistoryPayloads: (msg: any) => Promise<void>;
|
|
23
|
-
getSinksHistory: (msg: any) => Promise<void>;
|
|
24
|
-
private getMeasurementsDistribution;
|
|
25
|
-
private getMeasurementsOdMatrix;
|
|
26
|
-
private getHistoryPayload;
|
|
27
|
-
private getTimeRanges;
|
|
28
|
-
private getHttpSettings;
|
|
29
|
-
}
|
|
@@ -1,469 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.FlowWorkerTest = void 0;
|
|
16
|
-
const datasources_1 = require("../schema-definitions/datasources");
|
|
17
|
-
const index_1 = require("../schema-definitions/index");
|
|
18
|
-
const DateTime_1 = require("@golemio/core/dist/helpers/DateTime");
|
|
19
|
-
const config_1 = require("@golemio/core/dist/integration-engine/config");
|
|
20
|
-
const datasources_2 = require("@golemio/core/dist/integration-engine/datasources");
|
|
21
|
-
const HTTPRequestProtocolStrategyStreamed_1 = require("@golemio/core/dist/integration-engine/datasources/protocol-strategy/HTTPRequestProtocolStrategyStreamed");
|
|
22
|
-
const helpers_1 = require("@golemio/core/dist/integration-engine/helpers");
|
|
23
|
-
const models_1 = require("@golemio/core/dist/integration-engine/models");
|
|
24
|
-
const workers_1 = require("@golemio/core/dist/integration-engine/workers");
|
|
25
|
-
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
26
|
-
const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
|
|
27
|
-
const undici_1 = require("@golemio/core/dist/shared/undici");
|
|
28
|
-
const JSONStream_1 = __importDefault(require("JSONStream"));
|
|
29
|
-
const https_1 = __importDefault(require("https"));
|
|
30
|
-
/**
|
|
31
|
-
* Temporary worker for testing purposes
|
|
32
|
-
*/
|
|
33
|
-
class FlowWorkerTest extends workers_1.BaseWorker {
|
|
34
|
-
constructor() {
|
|
35
|
-
super();
|
|
36
|
-
this.queuePrefix = `${config_1.config.RABBIT_EXCHANGE_NAME}.${index_1.Flow.detections.name.toLowerCase()}-TEST`;
|
|
37
|
-
this.getHistoryIntervalFromMsg = (msg) => {
|
|
38
|
-
let historyIntervalsArr = [];
|
|
39
|
-
let msgObj = {};
|
|
40
|
-
try {
|
|
41
|
-
msgObj = JSON.parse(msg.content.toString());
|
|
42
|
-
}
|
|
43
|
-
catch (err) {
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
const customIntervalArr = !Array.isArray(msgObj) ? [msgObj] : msgObj;
|
|
47
|
-
customIntervalArr.forEach((intervalObj) => {
|
|
48
|
-
if (intervalObj.from && intervalObj.to) {
|
|
49
|
-
const from = +new Date(intervalObj.from);
|
|
50
|
-
const to = +new Date(intervalObj.to);
|
|
51
|
-
// if range is more than 12hrs:
|
|
52
|
-
if (to - from > 43200000) {
|
|
53
|
-
throw new golemio_errors_1.GeneralError("Maximum interval size exceeded. Use intervals of up to 12 hours.", this.constructor.name);
|
|
54
|
-
}
|
|
55
|
-
helpers_1.log.debug(`History interval from: ${from} to ${to} was used.`);
|
|
56
|
-
historyIntervalsArr.push([from, to]);
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
throw new golemio_errors_1.GeneralError("Interval must contain from and to properties.", this.constructor.name);
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
return historyIntervalsArr;
|
|
63
|
-
};
|
|
64
|
-
this.refreshCubes = (msg) => __awaiter(this, void 0, void 0, function* () {
|
|
65
|
-
let historyIntervalsArr = this.getHistoryIntervalFromMsg(msg);
|
|
66
|
-
let dataStream;
|
|
67
|
-
try {
|
|
68
|
-
this.cubesDataSource.protocolStrategy.setConnectionSettings(this.getHttpSettings("", "GET", null));
|
|
69
|
-
dataStream = yield this.cubesDataSource.getAll(true);
|
|
70
|
-
}
|
|
71
|
-
catch (err) {
|
|
72
|
-
throw new golemio_errors_1.GeneralError("Error while getting data.", this.constructor.name, err);
|
|
73
|
-
}
|
|
74
|
-
try {
|
|
75
|
-
yield dataStream
|
|
76
|
-
.setDataProcessor((data) => __awaiter(this, void 0, void 0, function* () {
|
|
77
|
-
yield this.flowCubesModel.save(data.map((cube) => {
|
|
78
|
-
return {
|
|
79
|
-
id: cube.id,
|
|
80
|
-
name: cube.name,
|
|
81
|
-
};
|
|
82
|
-
}));
|
|
83
|
-
const promises = data.map((cube) => {
|
|
84
|
-
cube.historyIntervalsArr = historyIntervalsArr;
|
|
85
|
-
return this.sendMessageToExchange("workers." + this.queuePrefix + ".getAnalytics", JSON.stringify(cube));
|
|
86
|
-
});
|
|
87
|
-
yield Promise.all(promises);
|
|
88
|
-
}))
|
|
89
|
-
.proceed();
|
|
90
|
-
}
|
|
91
|
-
catch (err) {
|
|
92
|
-
throw new golemio_errors_1.GeneralError("Error while processing data.", this.constructor.name, err);
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
this.getAnalytics = (msg) => __awaiter(this, void 0, void 0, function* () {
|
|
96
|
-
let input;
|
|
97
|
-
let dataStream;
|
|
98
|
-
let historyIntervalsArr;
|
|
99
|
-
try {
|
|
100
|
-
input = JSON.parse(msg.content.toString());
|
|
101
|
-
if ((input === null || input === void 0 ? void 0 : input.id) === undefined) {
|
|
102
|
-
throw new Error(`Can not process getAnalytics input: ${input}`);
|
|
103
|
-
}
|
|
104
|
-
historyIntervalsArr = input.historyIntervalsArr;
|
|
105
|
-
this.analyticsDataSource.protocolStrategy.setConnectionSettings(this.getHttpSettings(`/${input.id}/analytics`, "GET", null));
|
|
106
|
-
dataStream = yield this.analyticsDataSource.getAll(true);
|
|
107
|
-
}
|
|
108
|
-
catch (err) {
|
|
109
|
-
throw new golemio_errors_1.GeneralError("Error while getting data.", this.constructor.name, err);
|
|
110
|
-
}
|
|
111
|
-
try {
|
|
112
|
-
yield dataStream
|
|
113
|
-
.setDataProcessor((data) => __awaiter(this, void 0, void 0, function* () {
|
|
114
|
-
const url = new URL(this.test_url);
|
|
115
|
-
const clientOptions = {
|
|
116
|
-
connect: {
|
|
117
|
-
rejectUnauthorized: false,
|
|
118
|
-
},
|
|
119
|
-
};
|
|
120
|
-
const client = new undici_1.Client(url.origin, clientOptions);
|
|
121
|
-
const httpsAgent = new https_1.default.Agent({
|
|
122
|
-
rejectUnauthorized: false,
|
|
123
|
-
});
|
|
124
|
-
const axPromises = data.map((analytic) => __awaiter(this, void 0, void 0, function* () {
|
|
125
|
-
// no need for DataSource
|
|
126
|
-
const fullUrl = new URL(`${this.test_url}/${input.id}/analytics/${analytic.id}`);
|
|
127
|
-
const requestOptions = {
|
|
128
|
-
path: fullUrl.pathname + fullUrl.search,
|
|
129
|
-
method: "GET",
|
|
130
|
-
headers: {
|
|
131
|
-
"Accept-Version": "1.3",
|
|
132
|
-
Authorization: `Bearer ${config_1.config.datasources.FlowAPI.token}`,
|
|
133
|
-
"Content-Type": "application/json",
|
|
134
|
-
},
|
|
135
|
-
};
|
|
136
|
-
const result = yield client.request(requestOptions);
|
|
137
|
-
return result.body.json();
|
|
138
|
-
}));
|
|
139
|
-
const analytics = yield Promise.all(axPromises);
|
|
140
|
-
const exPromises = analytics.map((analytic) => {
|
|
141
|
-
return this.sendMessageToExchange("workers." + this.queuePrefix + ".getSinks", JSON.stringify({
|
|
142
|
-
analytic: analytic,
|
|
143
|
-
cube: input,
|
|
144
|
-
historyIntervalsArr,
|
|
145
|
-
}));
|
|
146
|
-
});
|
|
147
|
-
yield Promise.all(exPromises);
|
|
148
|
-
}))
|
|
149
|
-
.proceed();
|
|
150
|
-
}
|
|
151
|
-
catch (err) {
|
|
152
|
-
throw new golemio_errors_1.GeneralError("Error while processing data.", this.constructor.name, err);
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
this.getSinks = (msg) => __awaiter(this, void 0, void 0, function* () {
|
|
156
|
-
var _a, _b;
|
|
157
|
-
let input;
|
|
158
|
-
let dataStream;
|
|
159
|
-
let historyIntervalsArr;
|
|
160
|
-
try {
|
|
161
|
-
input = JSON.parse(msg.content.toString());
|
|
162
|
-
if (((_a = input === null || input === void 0 ? void 0 : input.analytic) === null || _a === void 0 ? void 0 : _a.id) === undefined || ((_b = input === null || input === void 0 ? void 0 : input.cube) === null || _b === void 0 ? void 0 : _b.id) === undefined) {
|
|
163
|
-
throw new Error(`Can not process getAnalytics input: ${JSON.stringify(input)}`);
|
|
164
|
-
}
|
|
165
|
-
historyIntervalsArr = input.historyIntervalsArr;
|
|
166
|
-
this.sinksDataSource.protocolStrategy.setConnectionSettings(this.getHttpSettings(`/${input.cube.id}/analytics/${input.analytic.id}/sinks`, "GET", null));
|
|
167
|
-
dataStream = yield this.sinksDataSource.getAll(true);
|
|
168
|
-
}
|
|
169
|
-
catch (err) {
|
|
170
|
-
throw new golemio_errors_1.GeneralError("Error while getting data.", this.constructor.name, err);
|
|
171
|
-
}
|
|
172
|
-
try {
|
|
173
|
-
yield dataStream
|
|
174
|
-
.setDataProcessor((data) => __awaiter(this, void 0, void 0, function* () {
|
|
175
|
-
yield this.flowSinksModel.save(data.map((sink) => {
|
|
176
|
-
return {
|
|
177
|
-
cube_id: +input.cube.id,
|
|
178
|
-
history_start_timestamp: new Date(+sink.history_start_timestamp),
|
|
179
|
-
id: sink.id,
|
|
180
|
-
name: sink.name,
|
|
181
|
-
output_value_type: sink.output_value_type,
|
|
182
|
-
};
|
|
183
|
-
}));
|
|
184
|
-
const dataWithDistributionSinks = data.filter((sink) => {
|
|
185
|
-
return (sink === null || sink === void 0 ? void 0 : sink.output_value_type) === "distribution";
|
|
186
|
-
});
|
|
187
|
-
const dataWithOdMatrixSinks = data.filter((sink) => {
|
|
188
|
-
return (sink === null || sink === void 0 ? void 0 : sink.output_value_type) === "od_matrix";
|
|
189
|
-
});
|
|
190
|
-
if (dataWithDistributionSinks.length)
|
|
191
|
-
yield this.sendMessageToExchange("workers." + this.queuePrefix + ".getSinksHistoryPayloads", JSON.stringify({
|
|
192
|
-
analytic: input.analytic,
|
|
193
|
-
cube: input.cube,
|
|
194
|
-
sinks: dataWithDistributionSinks,
|
|
195
|
-
sinksOutputValueType: "distribution",
|
|
196
|
-
historyIntervalsArr,
|
|
197
|
-
}));
|
|
198
|
-
if (dataWithOdMatrixSinks.length)
|
|
199
|
-
yield this.sendMessageToExchange("workers." + this.queuePrefix + ".getSinksHistoryPayloads", JSON.stringify({
|
|
200
|
-
analytic: input.analytic,
|
|
201
|
-
cube: input.cube,
|
|
202
|
-
sinks: dataWithOdMatrixSinks,
|
|
203
|
-
sinksOutputValueType: "od_matrix",
|
|
204
|
-
historyIntervalsArr,
|
|
205
|
-
}));
|
|
206
|
-
}))
|
|
207
|
-
.proceed();
|
|
208
|
-
}
|
|
209
|
-
catch (err) {
|
|
210
|
-
throw new golemio_errors_1.GeneralError("Error while processing data.", this.constructor.name, err);
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
this.getSinksHistoryPayloads = (msg) => __awaiter(this, void 0, void 0, function* () {
|
|
214
|
-
var _c, _d;
|
|
215
|
-
let input;
|
|
216
|
-
let historyIntervalsArr;
|
|
217
|
-
let timeRanges;
|
|
218
|
-
try {
|
|
219
|
-
input = JSON.parse(msg.content.toString());
|
|
220
|
-
if (((_c = input === null || input === void 0 ? void 0 : input.analytic) === null || _c === void 0 ? void 0 : _c.id) === undefined ||
|
|
221
|
-
((_d = input === null || input === void 0 ? void 0 : input.cube) === null || _d === void 0 ? void 0 : _d.id) === undefined ||
|
|
222
|
-
!input.sinks ||
|
|
223
|
-
!input.sinksOutputValueType) {
|
|
224
|
-
throw new Error(`Can not process getAnalytics input: ${JSON.stringify(input)}`);
|
|
225
|
-
}
|
|
226
|
-
historyIntervalsArr = input.historyIntervalsArr;
|
|
227
|
-
if (historyIntervalsArr)
|
|
228
|
-
timeRanges = historyIntervalsArr;
|
|
229
|
-
else
|
|
230
|
-
timeRanges = this.getTimeRanges();
|
|
231
|
-
yield Promise.all(this.getHistoryPayload(timeRanges, input).map((payload) => {
|
|
232
|
-
return this.sendMessageToExchange("workers." + this.queuePrefix + ".getSinksHistory", JSON.stringify({
|
|
233
|
-
analytic: input.analytic,
|
|
234
|
-
cube: input.cube,
|
|
235
|
-
payload,
|
|
236
|
-
sinksOutputValueType: input.sinksOutputValueType,
|
|
237
|
-
}));
|
|
238
|
-
}));
|
|
239
|
-
}
|
|
240
|
-
catch (err) {
|
|
241
|
-
throw new golemio_errors_1.GeneralError("Error while getting data.", this.constructor.name, err);
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
|
-
this.getSinksHistory = (msg) => __awaiter(this, void 0, void 0, function* () {
|
|
245
|
-
var _e, _f;
|
|
246
|
-
let dataStream;
|
|
247
|
-
let input;
|
|
248
|
-
try {
|
|
249
|
-
input = JSON.parse(msg.content.toString());
|
|
250
|
-
if (((_e = input === null || input === void 0 ? void 0 : input.analytic) === null || _e === void 0 ? void 0 : _e.id) === undefined ||
|
|
251
|
-
((_f = input === null || input === void 0 ? void 0 : input.cube) === null || _f === void 0 ? void 0 : _f.id) === undefined ||
|
|
252
|
-
!input.payload ||
|
|
253
|
-
!input.sinksOutputValueType) {
|
|
254
|
-
throw new Error(`Can not process getAnalytics input: ${JSON.stringify(input)}`);
|
|
255
|
-
}
|
|
256
|
-
this.sinksHistoryDataSource.protocolStrategy.setConnectionSettings(this.getHttpSettings(`/${input.cube.id}/analytics/${input.analytic.id}/sinks/history`, "POST", input.payload));
|
|
257
|
-
dataStream = yield this.sinksHistoryDataSource.getAll(true);
|
|
258
|
-
}
|
|
259
|
-
catch (err) {
|
|
260
|
-
throw new golemio_errors_1.GeneralError("Error while getting data.", this.constructor.name, err);
|
|
261
|
-
}
|
|
262
|
-
if (input.sinksOutputValueType === "distribution")
|
|
263
|
-
try {
|
|
264
|
-
yield dataStream
|
|
265
|
-
.setDataProcessor((data) => __awaiter(this, void 0, void 0, function* () {
|
|
266
|
-
const detections = this.getMeasurementsDistribution(data, input.cube.id, input.payload.sequence_number, input.analytic.id);
|
|
267
|
-
// filter duplicate data
|
|
268
|
-
const uniq = detections.filter((thing, index, self) => index ===
|
|
269
|
-
self.findIndex((t) => t.cube_id === thing.cube_id &&
|
|
270
|
-
t.sink_id === thing.sink_id &&
|
|
271
|
-
t.start_timestamp === thing.start_timestamp &&
|
|
272
|
-
t.end_timestamp === thing.end_timestamp &&
|
|
273
|
-
t.category === thing.category &&
|
|
274
|
-
t.sequence_number === thing.sequence_number &&
|
|
275
|
-
t.data_validity === thing.data_validity));
|
|
276
|
-
yield this.flowMeasurementModel.save(uniq, false);
|
|
277
|
-
}))
|
|
278
|
-
.proceed();
|
|
279
|
-
}
|
|
280
|
-
catch (err) {
|
|
281
|
-
throw new golemio_errors_1.GeneralError("Error while processing data (distribution sinks).", this.constructor.name, err);
|
|
282
|
-
}
|
|
283
|
-
if (input.sinksOutputValueType === "od_matrix")
|
|
284
|
-
try {
|
|
285
|
-
yield dataStream
|
|
286
|
-
.setDataProcessor((data) => __awaiter(this, void 0, void 0, function* () {
|
|
287
|
-
const detections = this.getMeasurementsOdMatrix(data, input.cube.id, input.payload.sequence_number, input.analytic.id);
|
|
288
|
-
// filter duplicate data
|
|
289
|
-
const uniq = detections.filter((thing, index, self) => index ===
|
|
290
|
-
self.findIndex((t) => t.cube_id === thing.cube_id &&
|
|
291
|
-
t.sink_id === thing.sink_id &&
|
|
292
|
-
t.start_timestamp === thing.start_timestamp &&
|
|
293
|
-
t.end_timestamp === thing.end_timestamp &&
|
|
294
|
-
t.category === thing.category &&
|
|
295
|
-
t.sequence_number === thing.sequence_number &&
|
|
296
|
-
t.data_validity === thing.data_validity &&
|
|
297
|
-
t.origin === thing.origin &&
|
|
298
|
-
t.destination === thing.destination));
|
|
299
|
-
yield this.flowODMeasurementModel.save(uniq, false);
|
|
300
|
-
}))
|
|
301
|
-
.proceed();
|
|
302
|
-
}
|
|
303
|
-
catch (err) {
|
|
304
|
-
throw new golemio_errors_1.GeneralError("Error while processing data (od_matrix sinks).", this.constructor.name, err);
|
|
305
|
-
}
|
|
306
|
-
});
|
|
307
|
-
this.getMeasurementsDistribution = (data, cube_id, sequence_number, analytic_id) => {
|
|
308
|
-
const measurementsNormalised = [];
|
|
309
|
-
data.forEach((element) => {
|
|
310
|
-
((element === null || element === void 0 ? void 0 : element.snapshots) || []).forEach((snapshot) => {
|
|
311
|
-
var _a;
|
|
312
|
-
(((_a = snapshot === null || snapshot === void 0 ? void 0 : snapshot.data) === null || _a === void 0 ? void 0 : _a.categories) || []).forEach((category) => {
|
|
313
|
-
// filter out 'old' format
|
|
314
|
-
const startTimestamp = parseInt(snapshot.data_start_timestamp, 10);
|
|
315
|
-
if (startTimestamp && !isNaN(startTimestamp)) {
|
|
316
|
-
measurementsNormalised.push({
|
|
317
|
-
sink_id: element.id,
|
|
318
|
-
cube_id,
|
|
319
|
-
sequence_number: +sequence_number,
|
|
320
|
-
analytic_id,
|
|
321
|
-
start_timestamp: new Date(+snapshot.data_start_timestamp),
|
|
322
|
-
end_timestamp: new Date(+snapshot.data_end_timestamp),
|
|
323
|
-
category: category.category,
|
|
324
|
-
value: category.count,
|
|
325
|
-
data_validity: snapshot.data.data_validity,
|
|
326
|
-
});
|
|
327
|
-
}
|
|
328
|
-
});
|
|
329
|
-
});
|
|
330
|
-
});
|
|
331
|
-
return measurementsNormalised;
|
|
332
|
-
};
|
|
333
|
-
this.getMeasurementsOdMatrix = (data, cube_id, sequence_number, analytic_id) => {
|
|
334
|
-
const measurementsNormalised = [];
|
|
335
|
-
data.forEach((element) => {
|
|
336
|
-
((element === null || element === void 0 ? void 0 : element.snapshots) || []).forEach((snapshot) => {
|
|
337
|
-
var _a;
|
|
338
|
-
const destinations = snapshot.data.destinations;
|
|
339
|
-
const origins = snapshot.data.origins;
|
|
340
|
-
(((_a = snapshot === null || snapshot === void 0 ? void 0 : snapshot.data) === null || _a === void 0 ? void 0 : _a.turning_movements) || []).forEach((category, categoryIndex) => {
|
|
341
|
-
const categoryName = category.category;
|
|
342
|
-
// filter out 'old' format
|
|
343
|
-
const startTimestamp = parseInt(snapshot.data_start_timestamp, 10);
|
|
344
|
-
if (startTimestamp && !isNaN(startTimestamp)) {
|
|
345
|
-
category.data.forEach((originRow, originIndex) => {
|
|
346
|
-
originRow.forEach((value, destinationIndex) => {
|
|
347
|
-
measurementsNormalised.push({
|
|
348
|
-
sink_id: element.id,
|
|
349
|
-
cube_id,
|
|
350
|
-
sequence_number: +sequence_number,
|
|
351
|
-
analytic_id,
|
|
352
|
-
start_timestamp: new Date(+snapshot.data_start_timestamp),
|
|
353
|
-
end_timestamp: new Date(+snapshot.data_end_timestamp),
|
|
354
|
-
category: categoryName,
|
|
355
|
-
origin: origins[originIndex].name,
|
|
356
|
-
destination: destinations[destinationIndex].name,
|
|
357
|
-
value,
|
|
358
|
-
data_validity: snapshot.data.data_validity,
|
|
359
|
-
});
|
|
360
|
-
});
|
|
361
|
-
});
|
|
362
|
-
}
|
|
363
|
-
});
|
|
364
|
-
});
|
|
365
|
-
});
|
|
366
|
-
return measurementsNormalised;
|
|
367
|
-
};
|
|
368
|
-
// get array of all pastOffset to past timeranges [startTS, endTS]
|
|
369
|
-
// where endTS - startTS === interval starting now - pastOffset
|
|
370
|
-
this.getTimeRanges = (pastOffset = 60, interval = 15) => {
|
|
371
|
-
const start = (0, DateTime_1.dateTime)(new Date(new Date().setUTCSeconds(0, 0)));
|
|
372
|
-
const fullMinsDiv2 = start.toDate().getMinutes() % interval;
|
|
373
|
-
const startTs = start.subtract(fullMinsDiv2, "minutes").valueOf();
|
|
374
|
-
const endTs = start.subtract(pastOffset, "minutes").valueOf();
|
|
375
|
-
const ranges = [];
|
|
376
|
-
let currentTs = startTs;
|
|
377
|
-
const intervalMs = interval * 60 * 1000;
|
|
378
|
-
while (currentTs - intervalMs > endTs) {
|
|
379
|
-
ranges.push([currentTs - intervalMs, currentTs]);
|
|
380
|
-
currentTs = currentTs - intervalMs;
|
|
381
|
-
}
|
|
382
|
-
return ranges;
|
|
383
|
-
};
|
|
384
|
-
this.getHttpSettings = (suffix = "", method = "GET", body = null) => {
|
|
385
|
-
const settings = {
|
|
386
|
-
headers: {
|
|
387
|
-
"Accept-Version": "1.3",
|
|
388
|
-
Authorization: `Bearer ${config_1.config.datasources.FlowAPI.token}`,
|
|
389
|
-
"Content-Type": "application/json",
|
|
390
|
-
},
|
|
391
|
-
method,
|
|
392
|
-
rejectUnauthorized: false,
|
|
393
|
-
url: `${this.test_url}${suffix}`,
|
|
394
|
-
};
|
|
395
|
-
if (body) {
|
|
396
|
-
settings.body = JSON.stringify(body);
|
|
397
|
-
}
|
|
398
|
-
return settings;
|
|
399
|
-
};
|
|
400
|
-
this.test_url = "https://10.200.210.1:8088/api/cubes";
|
|
401
|
-
this.flowMeasurementModel = new models_1.PostgresModel(index_1.Flow.detections.name + "Model", {
|
|
402
|
-
outputSequelizeAttributes: index_1.Flow.detections.outputSequelizeAttributes,
|
|
403
|
-
pgSchema: FlowWorkerTest.testSchema,
|
|
404
|
-
pgTableName: index_1.Flow.detections.pgTableName,
|
|
405
|
-
savingType: "insertOrUpdate",
|
|
406
|
-
}, new golemio_validator_1.JSONSchemaValidator("FlowMeasurementValidator", index_1.Flow.detections.jsonSchema));
|
|
407
|
-
this.flowODMeasurementModel = new models_1.PostgresModel(index_1.Flow.detectionsOD.name + "Model", {
|
|
408
|
-
outputSequelizeAttributes: index_1.Flow.detectionsOD.outputSequelizeAttributes,
|
|
409
|
-
pgSchema: FlowWorkerTest.testSchema,
|
|
410
|
-
pgTableName: index_1.Flow.detectionsOD.pgTableName,
|
|
411
|
-
savingType: "insertOrUpdate",
|
|
412
|
-
}, new golemio_validator_1.JSONSchemaValidator("FlowODMeasurementValidator", index_1.Flow.detectionsOD.jsonSchema));
|
|
413
|
-
this.flowCubesModel = new models_1.PostgresModel(index_1.Flow.cubes.name + "Model", {
|
|
414
|
-
outputSequelizeAttributes: index_1.Flow.cubes.outputSequelizeAttributes,
|
|
415
|
-
pgSchema: FlowWorkerTest.testSchema,
|
|
416
|
-
pgTableName: index_1.Flow.cubes.pgTableName,
|
|
417
|
-
savingType: "insertOrUpdate",
|
|
418
|
-
}, new golemio_validator_1.JSONSchemaValidator("FlowCubesValidator", index_1.Flow.cubes.jsonSchema));
|
|
419
|
-
this.flowSinksModel = new models_1.PostgresModel(index_1.Flow.sinks.name + "Model", {
|
|
420
|
-
outputSequelizeAttributes: index_1.Flow.sinks.outputSequelizeAttributes,
|
|
421
|
-
pgSchema: FlowWorkerTest.testSchema,
|
|
422
|
-
pgTableName: index_1.Flow.sinks.pgTableName,
|
|
423
|
-
savingType: "insertOrUpdate",
|
|
424
|
-
}, new golemio_validator_1.JSONSchemaValidator("FlowSinksValidator", index_1.Flow.sinks.jsonSchema));
|
|
425
|
-
this.cubesDataSource = new datasources_2.DataSourceStreamed(datasources_1.cubesDatasource.name, new HTTPRequestProtocolStrategyStreamed_1.HTTPRequestProtocolStrategyStreamed({
|
|
426
|
-
headers: {},
|
|
427
|
-
method: "GET",
|
|
428
|
-
url: this.test_url,
|
|
429
|
-
}).setStreamTransformer(JSONStream_1.default.parse("cubes.*")), new datasources_2.JSONDataTypeStrategy({ resultsPath: "" }), new golemio_validator_1.JSONSchemaValidator(datasources_1.cubesDatasource.name + "Validator", datasources_1.cubesDatasource.jsonSchema));
|
|
430
|
-
this.analyticsDataSource = new datasources_2.DataSourceStreamed(datasources_1.analyticsDatasource.name, new HTTPRequestProtocolStrategyStreamed_1.HTTPRequestProtocolStrategyStreamed({
|
|
431
|
-
headers: {},
|
|
432
|
-
method: "GET",
|
|
433
|
-
url: this.test_url,
|
|
434
|
-
}).setStreamTransformer(JSONStream_1.default.parse("analytics.*")), new datasources_2.JSONDataTypeStrategy({ resultsPath: "" }), new golemio_validator_1.JSONSchemaValidator(datasources_1.analyticsDatasource.name + "Validator", datasources_1.analyticsDatasource.jsonSchema));
|
|
435
|
-
this.sinksDataSource = new datasources_2.DataSourceStreamed(datasources_1.sinksDatasource.name, new HTTPRequestProtocolStrategyStreamed_1.HTTPRequestProtocolStrategyStreamed({
|
|
436
|
-
headers: {},
|
|
437
|
-
method: "GET",
|
|
438
|
-
url: this.test_url,
|
|
439
|
-
}).setStreamTransformer(JSONStream_1.default.parse("sinks.*")), new datasources_2.JSONDataTypeStrategy({ resultsPath: "" }), new golemio_validator_1.JSONSchemaValidator(datasources_1.sinksDatasource.name + "Validator", datasources_1.sinksDatasource.jsonSchema));
|
|
440
|
-
this.sinksHistoryDataSource = new datasources_2.DataSourceStreamed(datasources_1.sinksHistoryDatasource.name, new HTTPRequestProtocolStrategyStreamed_1.HTTPRequestProtocolStrategyStreamed({
|
|
441
|
-
headers: {},
|
|
442
|
-
method: "POST",
|
|
443
|
-
url: this.test_url,
|
|
444
|
-
}).setStreamTransformer(JSONStream_1.default.parse("sinks.*")), new datasources_2.JSONDataTypeStrategy({ resultsPath: "" }), new golemio_validator_1.JSONSchemaValidator(datasources_1.sinksHistoryDatasource.name + "Validator", datasources_1.sinksHistoryDatasource.jsonSchema));
|
|
445
|
-
}
|
|
446
|
-
getHistoryPayload(timeRanges, data) {
|
|
447
|
-
const payloads = [];
|
|
448
|
-
timeRanges.forEach((range) => {
|
|
449
|
-
const payload = {
|
|
450
|
-
sequence_number: data.analytic.sequence_number,
|
|
451
|
-
sinks: [],
|
|
452
|
-
};
|
|
453
|
-
data.sinks.forEach((sink) => {
|
|
454
|
-
payload.sinks.push({
|
|
455
|
-
// has to be string!
|
|
456
|
-
end_timestamp: `${range[1]}`,
|
|
457
|
-
id: sink.id,
|
|
458
|
-
// has to be string!
|
|
459
|
-
start_timestamp: `${range[0]}`,
|
|
460
|
-
});
|
|
461
|
-
});
|
|
462
|
-
payloads.push(payload);
|
|
463
|
-
});
|
|
464
|
-
return payloads;
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
exports.FlowWorkerTest = FlowWorkerTest;
|
|
468
|
-
FlowWorkerTest.testSchema = "flow_test";
|
|
469
|
-
//# sourceMappingURL=FlowWorkerTest.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FlowWorkerTest.js","sourceRoot":"","sources":["../../src/integration-engine/FlowWorkerTest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mEAAiH;AACjH,uDAAkC;AAClC,kEAA+D;AAC/D,yEAAsE;AACtE,mFAK2D;AAC3D,iKAA8J;AAC9J,2EAAoE;AACpE,yEAA6E;AAC7E,2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