@golemio/pid 2.7.12-dev.938565701 → 2.7.12-rc.942069756
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/index.js +0 -2
- package/dist/integration-engine/index.js.map +1 -1
- package/dist/integration-engine/queueDefinitions.js +50 -0
- package/dist/integration-engine/queueDefinitions.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/LegacyRopidGTFSWorker.d.ts +63 -0
- package/dist/integration-engine/ropid-gtfs/LegacyRopidGTFSWorker.js +541 -3
- package/dist/integration-engine/ropid-gtfs/LegacyRopidGTFSWorker.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.js +4 -18
- package/dist/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/interfaces/ICheckForNewDataInput.js.map +1 -0
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.js +3 -16
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/data-access/PresetLogRepository.js +1 -0
- package/dist/integration-engine/ropid-gtfs/workers/presets/data-access/PresetLogRepository.js.map +1 -1
- package/dist/output-gateway/pid/controllers/DepartureBoardsController.js +2 -1
- package/dist/output-gateway/pid/controllers/DepartureBoardsController.js.map +1 -1
- package/dist/output-gateway/pid/controllers/InfotextsController.js +1 -1
- package/dist/output-gateway/pid/controllers/InfotextsController.js.map +1 -1
- package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js +5 -4
- package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js.map +1 -1
- package/dist/output-gateway/vehicle-positions/VehiclePositionsRouter.js +2 -1
- package/dist/output-gateway/vehicle-positions/VehiclePositionsRouter.js.map +1 -1
- package/docs/implementation_documentation.md +37 -39
- package/package.json +2 -2
- package/dist/integration-engine/ropid-gtfs/ioc/Di.d.ts +0 -3
- package/dist/integration-engine/ropid-gtfs/ioc/Di.js +0 -29
- package/dist/integration-engine/ropid-gtfs/ioc/Di.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.d.ts +0 -8
- package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.js +0 -12
- package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.d.ts +0 -5
- package/dist/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.js +0 -23
- package/dist/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.d.ts +0 -12
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.js +0 -61
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.d.ts +0 -14
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js +0 -93
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/DownloadDatasetsTask.d.ts +0 -19
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/DownloadDatasetsTask.js +0 -152
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/DownloadDatasetsTask.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPrecomputedTablesTask.d.ts +0 -11
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPrecomputedTablesTask.js +0 -57
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPrecomputedTablesTask.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/TransformAndSaveDataTask.d.ts +0 -21
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/TransformAndSaveDataTask.js +0 -160
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/TransformAndSaveDataTask.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/HelperTypes.d.ts +0 -24
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/HelperTypes.js +0 -36
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/HelperTypes.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.d.ts +0 -12
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.js +0 -67
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.d.ts +0 -13
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.js +0 -102
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/interfaces/ICheckForNewDataInput.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/interfaces/IDatasetsInput.d.ts +0 -4
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/interfaces/IDatasetsInput.js +0 -3
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/interfaces/IDatasetsInput.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/schema/CachedDatasetSchema.d.ts +0 -8
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/schema/CachedDatasetSchema.js +0 -40
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/schema/CachedDatasetSchema.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/schema/CheckForNewDataMessageValidation.d.ts +0 -4
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/schema/CheckForNewDataMessageValidation.js +0 -22
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/schema/CheckForNewDataMessageValidation.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/schema/DownloadDataInputSchema.d.ts +0 -5
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/schema/DownloadDataInputSchema.js +0 -23
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/schema/DownloadDataInputSchema.js.map +0 -1
- /package/dist/integration-engine/ropid-gtfs/{workers/timetables/tasks/interfaces → interfaces}/ICheckForNewDataInput.d.ts +0 -0
- /package/dist/integration-engine/ropid-gtfs/{workers/timetables/tasks/interfaces → interfaces}/ICheckForNewDataInput.js +0 -0
|
@@ -1,29 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var StaticFileRedisRepository_1;
|
|
12
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
3
|
exports.StaticFileRedisRepository = void 0;
|
|
14
4
|
const RedisModel_1 = require("@golemio/core/dist/integration-engine/models/RedisModel");
|
|
15
|
-
|
|
16
|
-
let StaticFileRedisRepository = exports.StaticFileRedisRepository = StaticFileRedisRepository_1 = class StaticFileRedisRepository extends RedisModel_1.RedisModel {
|
|
5
|
+
class StaticFileRedisRepository extends RedisModel_1.RedisModel {
|
|
17
6
|
constructor() {
|
|
18
7
|
super("GTFSStaticFileRedisRepository", {
|
|
19
8
|
isKeyConstructedFromData: false,
|
|
20
|
-
prefix:
|
|
9
|
+
prefix: StaticFileRedisRepository.NAMESPACE_PREFIX,
|
|
21
10
|
});
|
|
22
11
|
}
|
|
23
|
-
}
|
|
12
|
+
}
|
|
13
|
+
exports.StaticFileRedisRepository = StaticFileRedisRepository;
|
|
24
14
|
StaticFileRedisRepository.NAMESPACE_PREFIX = "files:gtfsStatic";
|
|
25
|
-
exports.StaticFileRedisRepository = StaticFileRedisRepository = StaticFileRedisRepository_1 = __decorate([
|
|
26
|
-
(0, tsyringe_1.injectable)(),
|
|
27
|
-
__metadata("design:paramtypes", [])
|
|
28
|
-
], StaticFileRedisRepository);
|
|
29
15
|
//# sourceMappingURL=StaticFileRedisRepository.js.map
|
package/dist/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StaticFileRedisRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StaticFileRedisRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.ts"],"names":[],"mappings":";;;AAAA,wFAAqF;AAErF,MAAa,yBAA0B,SAAQ,uBAAU;IAGrD;QACI,KAAK,CAAC,+BAA+B,EAAE;YACnC,wBAAwB,EAAE,KAAK;YAC/B,MAAM,EAAE,yBAAyB,CAAC,gBAAgB;SACrD,CAAC,CAAC;IACP,CAAC;;AARL,8DASC;AARiB,0CAAgB,GAAG,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ICheckForNewDataInput.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/interfaces/ICheckForNewDataInput.ts"],"names":[],"mappings":""}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -25,11 +16,10 @@ exports.RopidGTFSTransformation = void 0;
|
|
|
25
16
|
const ropid_gtfs_1 = require("../../../schema-definitions/ropid-gtfs");
|
|
26
17
|
const integration_engine_1 = require("@golemio/core/dist/integration-engine");
|
|
27
18
|
const transformations_1 = require("@golemio/core/dist/integration-engine/transformations");
|
|
28
|
-
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
29
19
|
const csv_parser_1 = __importDefault(require("csv-parser"));
|
|
30
20
|
const csv_stringify_1 = __importDefault(require("csv-stringify"));
|
|
31
21
|
const stream_1 = require("stream");
|
|
32
|
-
|
|
22
|
+
class RopidGTFSTransformation extends transformations_1.BaseTransformation {
|
|
33
23
|
constructor() {
|
|
34
24
|
super();
|
|
35
25
|
this.transform = (input) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -62,9 +52,6 @@ let RopidGTFSTransformation = exports.RopidGTFSTransformation = class RopidGTFST
|
|
|
62
52
|
this.transformElement = () => { };
|
|
63
53
|
this.name = ropid_gtfs_1.RopidGTFS.name;
|
|
64
54
|
}
|
|
65
|
-
}
|
|
66
|
-
exports.RopidGTFSTransformation = RopidGTFSTransformation
|
|
67
|
-
(0, tsyringe_1.injectable)(),
|
|
68
|
-
__metadata("design:paramtypes", [])
|
|
69
|
-
], RopidGTFSTransformation);
|
|
55
|
+
}
|
|
56
|
+
exports.RopidGTFSTransformation = RopidGTFSTransformation;
|
|
70
57
|
//# sourceMappingURL=RopidGTFSTransformation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RopidGTFSTransformation.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RopidGTFSTransformation.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,uEAA4C;AAE5C,8EAA4D;AAC5D,2FAA4G;AAC5G,4DAA6B;AAC7B,kEAAsC;AACtC,mCAAuD;AAOvD,MAAa,uBAAwB,SAAQ,oCAAkB;IAG3D;QACI,KAAK,EAAE,CAAC;QAIL,cAAS,GAAG,CAAO,KAAmC,EAAqB,EAAE;YAChF,iEAAiE;YACjE,MAAM,4BAA4B,GAAG,MAAM,CAAC,IAAI,CAAC,sBAAS,CAAC,KAAK,CAAC,IAAuB,CAAC,CAAC,yBAAyB,CAAC;iBAC/G,MAAM,C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,CAAC,CAAC;iBAChE;YACL,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC;QAEQ,qBAAgB,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;QArClC,IAAI,CAAC,IAAI,GAAG,sBAAS,CAAC,IAAI,CAAC;IAC/B,CAAC;CAqCJ;AA3CD,0DA2CC"}
|
package/dist/integration-engine/ropid-gtfs/workers/presets/data-access/PresetLogRepository.js
CHANGED
|
@@ -125,6 +125,7 @@ let PresetLogRepository = exports.PresetLogRepository = class PresetLogRepositor
|
|
|
125
125
|
as: ropid_departures_presets_1.RopidDeparturesPresets.pgTableName,
|
|
126
126
|
foreignKey: "route_name",
|
|
127
127
|
sourceKey: "device_alias",
|
|
128
|
+
constraints: false,
|
|
128
129
|
scope: {
|
|
129
130
|
is_testing: false,
|
|
130
131
|
},
|
package/dist/integration-engine/ropid-gtfs/workers/presets/data-access/PresetLogRepository.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PresetLogRepository.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/presets/data-access/PresetLogRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+EAAoE;AACpE,gGAAmG;AACnG,mEAAuC;AACvC,kGAA0E;AAE1E,yGAAuE;AACvE,yEAA6E;AAC7E,6EAAwE;AACxE,mFAAkF;AAClF,iFAAiF;AACjF,iEAAwE;AAIjE,IAAM,mBAAmB,iCAAzB,MAAM,mBAAoB,SAAQ,sBAAa;IAGlD,YAAqE,0BAAsD;QACvH,KAAK,CACD,qBAAqB,EACrB;YACI,WAAW,EAAE,uBAAc,CAAC,SAAS;YACrC,QAAQ,EAAE,iBAAS;YACnB,yBAAyB,EAAE,uBAAc,CAAC,cAAc;YACxD,UAAU,EAAE,gBAAgB;SAC/B,EACD,IAAI,uCAAmB,CAAC,qBAAqB,EAAE,uBAAc,CAAC,eAAe,CAAC,CACjF,CAAC;
|
|
1
|
+
{"version":3,"file":"PresetLogRepository.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/presets/data-access/PresetLogRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+EAAoE;AACpE,gGAAmG;AACnG,mEAAuC;AACvC,kGAA0E;AAE1E,yGAAuE;AACvE,yEAA6E;AAC7E,6EAAwE;AACxE,mFAAkF;AAClF,iFAAiF;AACjF,iEAAwE;AAIjE,IAAM,mBAAmB,iCAAzB,MAAM,mBAAoB,SAAQ,sBAAa;IAGlD,YAAqE,0BAAsD;QACvH,KAAK,CACD,qBAAqB,EACrB;YACI,WAAW,EAAE,uBAAc,CAAC,SAAS;YACrC,QAAQ,EAAE,iBAAS;YACnB,yBAAyB,EAAE,uBAAc,CAAC,cAAc;YACxD,UAAU,EAAE,gBAAgB;SAC/B,EACD,IAAI,uCAAmB,CAAC,qBAAqB,EAAE,uBAAc,CAAC,eAAe,CAAC,CACjF,CAAC;QAaC,oBAAe,GAAG,CAAO,KAAa,EAA6B,EAAE;YACxE,IAAI;gBACA,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;oBACrC,UAAU,EAAE,CAAC,IAAI,EAAE,cAAc,EAAE,aAAa,CAAC;oBACjD,OAAO,EAAE;wBACL;4BACI,WAAW,EAAE,iDAAsB,CAAC,WAAW;4BAC/C,UAAU,EAAE,EAAE;4BACd,QAAQ,EAAE,IAAI;yBACjB;qBACJ;oBACD,KAAK,EAAE;wBACH,YAAY,EAAE,KAAK;qBACtB;oBACD,KAAK;iBACR,CAAC,CAAC;aACN;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAAC,8CAA8C,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;aACtG;QACL,CAAC,CAAA,CAAC;QAEK,aAAQ,GAAG,CAAO,IA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F;QACL,CAAC,CAAA,CAAC;QAtEE,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,0BAA0B,CAAC,gBAAgB,CAAC,EAAE;YACrE,EAAE,EAAE,iDAAsB,CAAC,WAAW;YACtC,UAAU,EAAE,YAAY;YACxB,SAAS,EAAE,cAAc;YACzB,WAAW,EAAE,KAAK;YAClB,KAAK,EAAE;gBACH,UAAU,EAAE,KAAK;aACpB;SACJ,CAAC,CAAC;IACP,CAAC;CA8DJ,CAAA;8BAtFY,mBAAmB;IAD/B,IAAA,qBAAU,GAAE;IAII,WAAA,IAAA,iBAAM,EAAC,2CAAoB,CAAC,0BAA0B,CAAC,CAAA;qCAA6B,uDAA0B;GAHlH,mBAAmB,CAsF/B"}
|
|
@@ -15,6 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.DepartureBoardsController = void 0;
|
|
16
16
|
const moment_timezone_1 = __importDefault(require("@golemio/core/dist/shared/moment-timezone"));
|
|
17
17
|
const trace_provider_1 = require("@golemio/core/dist/monitoring/opentelemetry/trace-provider");
|
|
18
|
+
const config_1 = require("@golemio/core/dist/output-gateway/config");
|
|
18
19
|
const shared_1 = require("../../shared");
|
|
19
20
|
const models_1 = require("../models");
|
|
20
21
|
const dto_1 = require("../dto");
|
|
@@ -37,7 +38,7 @@ class DepartureBoardsController {
|
|
|
37
38
|
? (0, moment_timezone_1.default)(query.timeFrom)
|
|
38
39
|
: moment_timezone_1.default.tz(query.timeFrom, preferredTimezone)
|
|
39
40
|
: undefined;
|
|
40
|
-
const span = (0, trace_provider_1.createChildSpan)("DepartureBoardsController.getDepartureBoard");
|
|
41
|
+
const span = (0, trace_provider_1.createChildSpan)("DepartureBoardsController.getDepartureBoard", config_1.config.telemetry);
|
|
41
42
|
try {
|
|
42
43
|
const data = yield this.departureBoardsModel.GetAll({
|
|
43
44
|
aswIds: query.aswIds,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DepartureBoardsController.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/controllers/DepartureBoardsController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gGAA2E;AAE3E,+FAA6F;
|
|
1
|
+
{"version":3,"file":"DepartureBoardsController.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/controllers/DepartureBoardsController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gGAA2E;AAE3E,+FAA6F;AAC7F,qEAAkE;AAClE,yCAA8C;AAC9C,sCAAyD;AACzD,gCAAkF;AAElF,MAAa,yBAAyB;IAGlC;QAIO,sBAAiB,GAAmB,CAAO,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;;YAChE,MAAM,KAAK,GAAG,yBAAgB,CAAC,sBAAsB,CAAC,6BAAuB,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;YAC1F,MAAM,iBAAiB,GAAG,yBAAgB,CAAC,oBAAoB,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;YAEzF,oDAAoD;YACpD,cAAc;YACd,uBAAuB;YACvB,0BAA0B;YAC1B,yBAAyB;YACzB,4BAA4B;YAC5B,MAAM,qBAAqB,GAAW,uDAAuD,CAAC;YAC9F,+DAA+D;YAC/D,MAAM,QAAQ,GAAuB,KAAK,CAAC,QAAQ;gBAC/C,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,qBAAqB,CAAC;oBACzC,CAAC,CAAC,IAAA,yBAAM,EAAC,KAAK,CAAC,QAAQ,CAAC;oBACxB,CAAC,CAAC,yBAAM,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,iBAAiB,CAAC;gBAClD,CAAC,CAAC,SAAS,CAAC;YAEhB,MAAM,IAAI,GAAG,IAAA,gCAAe,EAAC,6CAA6C,EAAE,eAAM,CAAC,SAAS,CAAC,CAAC;YAC9F,IAAI;gBACA,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC;oBA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fotexts = (_req, res, next) => __awaiter(this, void 0, void 0, function* () {
|
|
19
|
-
const span = (0, trace_provider_1.createChildSpan)("InfotextsController.getInfotexts");
|
|
19
|
+
const span = (0, trace_provider_1.createChildSpan)("InfotextsController.getInfotexts", config_1.config.telemetry);
|
|
20
20
|
try {
|
|
21
21
|
const preferredTimezone = config_1.config.vehiclePositions.defaultTimezone;
|
|
22
22
|
const data = yield this.eventsStopsModel.GetAllWithRoutes(preferredTimezone);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InfotextsController.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/controllers/InfotextsController.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,+FAA6F;AAC7F,qEAAkE;AAClE,sCAA2D;AAE3D,MAAa,mBAAmB;IAG5B;QAIO,iBAAY,GAAmB,CAAO,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YAC5D,MAAM,IAAI,GAAG,IAAA,gCAAe,EAAC,kCAAkC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"InfotextsController.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/controllers/InfotextsController.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,+FAA6F;AAC7F,qEAAkE;AAClE,sCAA2D;AAE3D,MAAa,mBAAmB;IAG5B;QAIO,iBAAY,GAAmB,CAAO,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YAC5D,MAAM,IAAI,GAAG,IAAA,gCAAe,EAAC,kCAAkC,EAAE,eAAM,CAAC,SAAS,CAAC,CAAC;YAEnF,IAAI;gBACA,MAAM,iBAAiB,GAAG,eAAM,CAAC,gBAAgB,CAAC,eAAe,CAAC;gBAClE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;gBAC7E,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aAC9B;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,GAAG,CAAC,CAAC;aACb;oBAAS;gBACN,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,GAAG,EAAE,CAAC;aACf;QACL,CAAC,CAAA,CAAC;QAfE,IAAI,CAAC,gBAAgB,GAAG,IAAI,kCAAyB,EAAE,CAAC;IAC5D,CAAC;CAeJ;AApBD,kDAoBC"}
|
|
@@ -19,6 +19,7 @@ const models_1 = require("../../ropid-gtfs/models");
|
|
|
19
19
|
const _1 = require(".");
|
|
20
20
|
const __1 = require("..");
|
|
21
21
|
const data_access_1 = require("../data-access");
|
|
22
|
+
const config_1 = require("@golemio/core/dist/output-gateway/config");
|
|
22
23
|
const trace_provider_1 = require("@golemio/core/dist/monitoring/opentelemetry/trace-provider");
|
|
23
24
|
const PIDDepartureModel_1 = __importDefault(require("./helpers/PIDDepartureModel"));
|
|
24
25
|
class PIDDepartureBoardsModel {
|
|
@@ -34,7 +35,7 @@ class PIDDepartureBoardsModel {
|
|
|
34
35
|
const minutesOffset = options.timeFrom ? options.timeFrom.diff(currentMoment, "minutes") : 0;
|
|
35
36
|
// Combination of ?minutesBefore > 0 and ?skip=atStop is not supported, fall back to 0
|
|
36
37
|
const minutesBefore = options.skip.includes(__1.DepartureSkip.AT_STOP) && options.minutesBefore > 0 ? 0 : options.minutesBefore;
|
|
37
|
-
const spanStops = (0, trace_provider_1.createChildSpan)("PIDRouter.DB.stops");
|
|
38
|
+
const spanStops = (0, trace_provider_1.createChildSpan)("PIDRouter.DB.stops", config_1.config.telemetry);
|
|
38
39
|
spanStops === null || spanStops === void 0 ? void 0 : spanStops.setAttributes(Object.assign(Object.assign({}, options), { timeFrom: (_a = options.timeFrom) === null || _a === void 0 ? void 0 : _a.toString() }));
|
|
39
40
|
const stopsToInclude = yield models_1.models.GTFSStopModel.GetAll({
|
|
40
41
|
includeMetroTrains: options.includeMetroTrains,
|
|
@@ -55,7 +56,7 @@ class PIDDepartureBoardsModel {
|
|
|
55
56
|
}
|
|
56
57
|
const stopsIds = stopsToInclude.map((e) => e.stop_id);
|
|
57
58
|
spanStops === null || spanStops === void 0 ? void 0 : spanStops.end();
|
|
58
|
-
const spanVymi = (0, trace_provider_1.createChildSpan)("PIDRouter.DB.vymi");
|
|
59
|
+
const spanVymi = (0, trace_provider_1.createChildSpan)("PIDRouter.DB.vymi", config_1.config.telemetry);
|
|
59
60
|
let infotextsToInclude;
|
|
60
61
|
try {
|
|
61
62
|
infotextsToInclude = yield this.ropidVYMIEventsStopsModel.GetAllDistinctWithEvents(stopsIds, (_b = options.timeFrom) !== null && _b !== void 0 ? _b : currentMoment, options.timezone);
|
|
@@ -64,7 +65,7 @@ class PIDDepartureBoardsModel {
|
|
|
64
65
|
throw new golemio_errors_1.GeneralError("Database error", "DepartureBoardsModel", err, 500);
|
|
65
66
|
}
|
|
66
67
|
spanVymi === null || spanVymi === void 0 ? void 0 : spanVymi.end();
|
|
67
|
-
const spanDirections = (0, trace_provider_1.createChildSpan)("PIDRouter.DB.directions");
|
|
68
|
+
const spanDirections = (0, trace_provider_1.createChildSpan)("PIDRouter.DB.directions", config_1.config.telemetry);
|
|
68
69
|
let departuresDirections;
|
|
69
70
|
try {
|
|
70
71
|
departuresDirections = yield this.ropidDeparturesDirectionsModel.GetAll(stopsIds);
|
|
@@ -83,7 +84,7 @@ class PIDDepartureBoardsModel {
|
|
|
83
84
|
mode: options.mode,
|
|
84
85
|
isAirCondition: !!options.airCondition,
|
|
85
86
|
});
|
|
86
|
-
const spanDepartures = (0, trace_provider_1.createChildSpan)("PIDRouter.DB.departures");
|
|
87
|
+
const spanDepartures = (0, trace_provider_1.createChildSpan)("PIDRouter.DB.departures", config_1.config.telemetry);
|
|
87
88
|
const res = {
|
|
88
89
|
departures: new PIDDepartureModel_1.default(results, {
|
|
89
90
|
limit: options.limit,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PIDDepartureBoardsModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/models/PIDDepartureBoardsModel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6EAAwE;AACxE,gGAA2E;AAC3E,oDAA+C;AAC/C,wBAA8E;AAC9E,0BAAmF;AAEnF,gDAA2D;
|
|
1
|
+
{"version":3,"file":"PIDDepartureBoardsModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/models/PIDDepartureBoardsModel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6EAAwE;AACxE,gGAA2E;AAC3E,oDAA+C;AAC/C,wBAA8E;AAC9E,0BAAmF;AAEnF,gDAA2D;AAC3D,qEAAkE;AAClE,+FAA6F;AAE7F,oFAA6D;AAE7D,MAAM,uBAAuB;IAMzB;QALQ,kBAAa,GAAG,GAAG,CAAC;QAW5B;;;WAGG;QACI,WAAM,GAAG,CAAO,OAkBtB,EAAgB,EAAE;;YACf,MAAM,aAAa,GAAG,IAAA,yBAAM,GAAE,CAAC;YAC/B,MAAM,aAAa,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC7F,sFAAsF;YACtF,MAAM,aAAa,GACf,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,iBAAa,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,aAAa,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC;YAE1G,MAAM,SAAS,GAAG,IAAA,gCAAe,EAAC,oBAAoB,EAAE,eAAM,CAAC,SAAS,CAAC,CAAC;YAC1E,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,aAAa,CAAC,gCAAK,OAAO,KAAE,QAAQ,EAAE,MAAA,OAAO,CAAC,QAAQ,0CAAE,QAAQ,EAAE,GAAoB,CAAC,CAAC;YACnG,MAAM,cAAc,GAAG,MAAM,eA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AAQ,EAAE,OAAO,CAAC,QAAQ;qBAC7B,CAAC,CAAC,OAAO,EAAE;oBACZ,SAAS,EAAE,kBAAkB;oBAC7B,KAAK,EAAE,cAAc;iBACxB,CAAC;gBACF,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,GAAG,EAAE,CAAC;gBACtB,OAAO,GAAG,CAAC;aACd;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAAC,gBAAgB,EAAE,sBAAsB,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;aAC9E;QACL,CAAC,CAAA,CAAC;QApHE,IAAI,CAAC,yBAAyB,GAAG,IAAI,4BAAyB,EAAE,CAAC;QACjE,IAAI,CAAC,8BAA8B,GAAG,IAAI,iCAA8B,EAAE,CAAC;QAC3E,IAAI,CAAC,oBAAoB,GAAG,IAAI,kCAAoB,EAAE,CAAC;IAC3D,CAAC;CAkHJ;AAEQ,0DAAuB"}
|
|
@@ -21,6 +21,7 @@ exports.vehiclepositionsRouter = exports.VehiclePositionsRouter = void 0;
|
|
|
21
21
|
const shared_1 = require("../shared");
|
|
22
22
|
const constants_1 = require("../shared/constants");
|
|
23
23
|
const trace_provider_1 = require("@golemio/core/dist/monitoring/opentelemetry/trace-provider");
|
|
24
|
+
const config_1 = require("@golemio/core/dist/output-gateway/config");
|
|
24
25
|
const redis_1 = require("@golemio/core/dist/output-gateway/redis");
|
|
25
26
|
const Utils_1 = require("@golemio/core/dist/output-gateway/Utils");
|
|
26
27
|
const Validation_1 = require("@golemio/core/dist/output-gateway/Validation");
|
|
@@ -34,7 +35,7 @@ class VehiclePositionsRouter {
|
|
|
34
35
|
constructor() {
|
|
35
36
|
this.GetAll = (req, res, next) => __awaiter(this, void 0, void 0, function* () {
|
|
36
37
|
const preferredTimezone = shared_1.RopidRouterUtils.getPreferredTimezone(req.query.preferredTimezone);
|
|
37
|
-
const span = (0, trace_provider_1.createChildSpan)("VehiclePositionsRouter.GetAll");
|
|
38
|
+
const span = (0, trace_provider_1.createChildSpan)("VehiclePositionsRouter.GetAll", config_1.config.telemetry);
|
|
38
39
|
try {
|
|
39
40
|
const result = yield this.tripWithPositionRepository.GetAll({
|
|
40
41
|
cisTripNumber: Number(req.query.cisTripNumber) || undefined,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VehiclePositionsRouter.js","sourceRoot":"","sources":["../../../src/output-gateway/vehicle-positions/VehiclePositionsRouter.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;AAEH,sCAA8C;AAC9C,mDAAwD;AACxD,+FAA6F;
|
|
1
|
+
{"version":3,"file":"VehiclePositionsRouter.js","sourceRoot":"","sources":["../../../src/output-gateway/vehicle-positions/VehiclePositionsRouter.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;AAEH,sCAA8C;AAC9C,mDAAwD;AACxD,+FAA6F;AAC7F,qEAAkE;AAClE,mEAA6F;AAC7F,mEAAiF;AACjF,6EAAkH;AAClH,+DAA4G;AAC5G,mFAA2E;AAC3E,6EAAwE;AACxE,gGAA+D;AAC/D,+BAAiC;AACjC,+CAA6C;AAG7C,MAAa,sBAAsB;IAI/B;QAMO,WAAM,GAAG,CAAO,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAE,EAAE;YACtE,MAAM,iBAAiB,GAAG,yBAAgB,CAAC,oBAAoB,CAAC,GAAG,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;YAC7F,MAAM,IAAI,GAAG,IAAA,gCAAe,EAAC,+BAA+B,EAAE,eAAM,CAAC,SAAS,CAAC,CAAC;YAChF,IAAI;gBACA,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,0BAA0B,CAAC,MAAM,CAAC;oBACxD,aAAa,EAAE,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,SAAS;oBAC3D,kBAAkB,EAAE,IAAA,8BAAsB,EAAC,GAAG,CAAC,KAAK,CAAC,kBAA4B,CA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,MAAM,GAAG,IAAA,gBAAM,GAAE,CAAC;QACvB,IAAI,CAAC,0BAA0B,GAAG,0BAAY,CAAC,8BAA8B,CAAC;QAC9E,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IACjC,CAAC;CA2GJ;AAnHD,wDAmHC;AAED,MAAM,sBAAsB,GAAW,IAAI,sBAAsB,EAAE,CAAC,MAAM,CAAC;AAClE,wDAAsB"}
|
|
@@ -367,42 +367,9 @@ Všechny tabulky se nachází ve schématu `pid`
|
|
|
367
367
|
|
|
368
368
|
### _LegacyRopidGTFSWorker_
|
|
369
369
|
|
|
370
|
-
Worker má na starost aktualizaci
|
|
370
|
+
Worker má na starost kontrolu a aktualizaci všech číselníků
|
|
371
371
|
|
|
372
|
-
####
|
|
373
|
-
|
|
374
|
-
- vstupní rabbitmq fronta
|
|
375
|
-
- název: vehicle-positions.ropidgtfs.checkForNewDeparturesPresets
|
|
376
|
-
- TTL: 4 minuty
|
|
377
|
-
- parametry: žádné
|
|
378
|
-
- závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
|
|
379
|
-
- název: vehicle-positions.ropidgtfs.downloadDeparturesPresets
|
|
380
|
-
- datové zdroje
|
|
381
|
-
- ROPID FTP
|
|
382
|
-
- transformace
|
|
383
|
-
- žádné
|
|
384
|
-
- data modely
|
|
385
|
-
- RopidGTFSMetadataModel `ropidgtfs_metadata`
|
|
386
|
-
|
|
387
|
-
#### _downloadDeparturesPresets()_
|
|
388
|
-
|
|
389
|
-
- vstupní rabbitmq fronta
|
|
390
|
-
- název: vehicle-positions.ropidgtfs.downloadDeparturesPresets
|
|
391
|
-
- TTL: 4 minuty
|
|
392
|
-
- parametry: žádné
|
|
393
|
-
- závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
|
|
394
|
-
- žádné
|
|
395
|
-
- datové zdroje
|
|
396
|
-
- ROPID FTP
|
|
397
|
-
- transformace
|
|
398
|
-
- [RopidDeparturesPresetsTransformation](https://gitlab.com/operator-ict/golemio/code/modules/pid/-/blob/development/src/integration-engine/ropid-gtfs/transformations/RopidDeparturesPresetsTransformation.ts)
|
|
399
|
-
- data modely
|
|
400
|
-
- RopidGTFSMetadataModel `ropidgtfs_metadata`,
|
|
401
|
-
- RopidDeparturesPresetsModel `ropid_departures_presets`
|
|
402
|
-
|
|
403
|
-
### TimetableWorker
|
|
404
|
-
|
|
405
|
-
#### task _CheckForNewData_
|
|
372
|
+
#### _checkForNewData()_
|
|
406
373
|
|
|
407
374
|
- vstupní rabbitmq fronta
|
|
408
375
|
- název: vehicle-positions.ropidgtfs.checkForNewData
|
|
@@ -417,7 +384,7 @@ Worker má na starost aktualizaci presets číselníků
|
|
|
417
384
|
- data modely
|
|
418
385
|
- RopidGTFSMetadataModel `ropidgtfs_metadata`
|
|
419
386
|
|
|
420
|
-
####
|
|
387
|
+
#### _downloadDatasets()_
|
|
421
388
|
|
|
422
389
|
- vstupní rabbitmq fronta
|
|
423
390
|
- název: vehicle-positions.ropidgtfs.downloadDatasets
|
|
@@ -433,7 +400,7 @@ Worker má na starost aktualizaci presets číselníků
|
|
|
433
400
|
- data modely
|
|
434
401
|
- RopidGTFSMetadataModel `ropidgtfs_metadata`
|
|
435
402
|
|
|
436
|
-
####
|
|
403
|
+
#### _transformAndSaveData()_
|
|
437
404
|
|
|
438
405
|
- vstupní rabbitmq fronta
|
|
439
406
|
- název: vehicle-positions.ropidgtfs.transformAndSaveData
|
|
@@ -463,7 +430,7 @@ Worker má na starost aktualizaci presets číselníků
|
|
|
463
430
|
- RopidGTFSOisModel `ropidgtfs_ois`
|
|
464
431
|
- RopidGTFSRunNumbersModel `ropidgtfs_run_numbers`
|
|
465
432
|
|
|
466
|
-
####
|
|
433
|
+
#### _checkSavedRowsAndReplaceTables()_
|
|
467
434
|
|
|
468
435
|
- vstupní rabbitmq fronta
|
|
469
436
|
- název: vehicle-positions.ropidgtfs.checkSavedRowsAndReplaceTables
|
|
@@ -496,7 +463,7 @@ Worker má na starost aktualizaci presets číselníků
|
|
|
496
463
|
- RopidGTFSPrecomputedDeparturesModel `ropidgtfs_precomputed_departures`
|
|
497
464
|
- RopidGTFSPrecomputedTripScheduleModel `ropidgtfs_precomputed_trip_schedule`
|
|
498
465
|
|
|
499
|
-
####
|
|
466
|
+
#### _refreshPrecomputedTables()_
|
|
500
467
|
|
|
501
468
|
- vstupní rabbitmq fronta
|
|
502
469
|
- název: vehicle-positions.ropidgtfs.refreshPrecomputedTables
|
|
@@ -515,6 +482,37 @@ Worker má na starost aktualizaci presets číselníků
|
|
|
515
482
|
- RopidGTFSPrecomputedDeparturesModel `ropidgtfs_precomputed_departures`
|
|
516
483
|
- RopidGTFSPrecomputedTripScheduleModel `ropidgtfs_precomputed_trip_schedule`
|
|
517
484
|
|
|
485
|
+
#### _checkForNewDeparturesPresets()_
|
|
486
|
+
|
|
487
|
+
- vstupní rabbitmq fronta
|
|
488
|
+
- název: vehicle-positions.ropidgtfs.checkForNewDeparturesPresets
|
|
489
|
+
- TTL: 4 minuty
|
|
490
|
+
- parametry: žádné
|
|
491
|
+
- závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
|
|
492
|
+
- název: vehicle-positions.ropidgtfs.downloadDeparturesPresets
|
|
493
|
+
- datové zdroje
|
|
494
|
+
- ROPID FTP
|
|
495
|
+
- transformace
|
|
496
|
+
- žádné
|
|
497
|
+
- data modely
|
|
498
|
+
- RopidGTFSMetadataModel `ropidgtfs_metadata`
|
|
499
|
+
|
|
500
|
+
#### _downloadDeparturesPresets()_
|
|
501
|
+
|
|
502
|
+
- vstupní rabbitmq fronta
|
|
503
|
+
- název: vehicle-positions.ropidgtfs.downloadDeparturesPresets
|
|
504
|
+
- TTL: 4 minuty
|
|
505
|
+
- parametry: žádné
|
|
506
|
+
- závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
|
|
507
|
+
- žádné
|
|
508
|
+
- datové zdroje
|
|
509
|
+
- ROPID FTP
|
|
510
|
+
- transformace
|
|
511
|
+
- [RopidDeparturesPresetsTransformation](https://gitlab.com/operator-ict/golemio/code/modules/pid/-/blob/development/src/integration-engine/ropid-gtfs/transformations/RopidDeparturesPresetsTransformation.ts)
|
|
512
|
+
- data modely
|
|
513
|
+
- RopidGTFSMetadataModel `ropidgtfs_metadata`,
|
|
514
|
+
- RopidDeparturesPresetsModel `ropid_departures_presets`
|
|
515
|
+
|
|
518
516
|
### PresetWorker
|
|
519
517
|
|
|
520
518
|
#### _Task ~ SavePresetsDataTask_
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemio/pid",
|
|
3
|
-
"version": "2.7.12-
|
|
3
|
+
"version": "2.7.12-rc.942069756",
|
|
4
4
|
"description": "Golemio PID Module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@commitlint/cli": "^11.0.0",
|
|
40
40
|
"@commitlint/config-conventional": "^11.0.0",
|
|
41
41
|
"@golemio/cli": "1.4.4",
|
|
42
|
-
"@golemio/core": "1.8.
|
|
42
|
+
"@golemio/core": "1.8.2",
|
|
43
43
|
"@golemio/db-common": "1.1.1",
|
|
44
44
|
"@golemio/eslint-config": "1.1.1",
|
|
45
45
|
"@types/amqplib": "^0.5.17",
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RopidGtfsContainer = void 0;
|
|
4
|
-
const Di_1 = require("../../ioc/Di");
|
|
5
|
-
const ropid_gtfs_1 = require("../../../schema-definitions/ropid-gtfs");
|
|
6
|
-
const pubsub_1 = require("@golemio/core/dist/integration-engine/data-access/pubsub");
|
|
7
|
-
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
8
|
-
const StaticFileRedisRepository_1 = require("../data-access/cache/StaticFileRedisRepository");
|
|
9
|
-
const RopidGTFSTransformation_1 = require("../transformations/RopidGTFSTransformation");
|
|
10
|
-
const PrecomputedTablesFacade_1 = require("../workers/timetables/tasks/helpers/PrecomputedTablesFacade");
|
|
11
|
-
const RopidGtfsFactory_1 = require("../workers/timetables/tasks/helpers/RopidGtfsFactory");
|
|
12
|
-
const RopidGtfsContainerToken_1 = require("./RopidGtfsContainerToken");
|
|
13
|
-
//#region Initialization
|
|
14
|
-
const RopidGtfsContainer = Di_1.PidContainer.createChildContainer();
|
|
15
|
-
exports.RopidGtfsContainer = RopidGtfsContainer;
|
|
16
|
-
//#endregion
|
|
17
|
-
//#region Datasources
|
|
18
|
-
//#endregion
|
|
19
|
-
//#region Repositories
|
|
20
|
-
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.StaticFileRedisRepository, StaticFileRedisRepository_1.StaticFileRedisRepository);
|
|
21
|
-
//#endregion
|
|
22
|
-
//#region Transformations
|
|
23
|
-
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGTFSTransformation, RopidGTFSTransformation_1.RopidGTFSTransformation);
|
|
24
|
-
//#endregion
|
|
25
|
-
//#region Facade
|
|
26
|
-
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.PrecomputedTablesFacade, PrecomputedTablesFacade_1.PrecomputedTablesFacade)
|
|
27
|
-
.register(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGtfsFactory, RopidGtfsFactory_1.RopidGtfsFactory, { lifecycle: tsyringe_1.Lifecycle.Transient })
|
|
28
|
-
.registerInstance(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RedisPubSubChannel, new pubsub_1.RedisPubSubChannel(ropid_gtfs_1.RopidGTFS.name));
|
|
29
|
-
//# sourceMappingURL=Di.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAC1C,uEAA4C;AAC5C,qFAA8F;AAC9F,iEAAoF;AACpF,8FAA2F;AAC3F,wFAAqF;AACrF,yGAAsG;AACtG,2FAAwF;AACxF,uEAAoE;AAEpE,wBAAwB;AACxB,MAAM,kBAAkB,GAAwB,iBAAY,CAAC,oBAAoB,EAAE,CAAC;AAqB3E,gDAAkB;AApB3B,YAAY;AAEZ,qBAAqB;AAErB,YAAY;AAEZ,sBAAsB;AACtB,kBAAkB,CAAC,iBAAiB,CAAC,iDAAuB,CAAC,yBAAyB,EAAE,qDAAyB,CAAC,CAAC;AACnH,YAAY;AAEZ,yBAAyB;AACzB,kBAAkB,CAAC,iBAAiB,CAAC,iDAAuB,CAAC,uBAAuB,EAAE,iDAAuB,CAAC,CAAC;AAC/G,YAAY;AAEZ,gBAAgB;AAChB,kBAAkB,CAAC,iBAAiB,CAAC,iDAAuB,CAAC,uBAAuB,EAAE,iDAAuB,CAAC;KACzG,QAAQ,CAAC,iDAAuB,CAAC,gBAAgB,EAAE,mCAAgB,EAAE,EAAE,SAAS,EAAE,oBAAS,CAAC,SAAS,EAAE,CAAC;KACxG,gBAAgB,CAAC,iDAAuB,CAAC,kBAAkB,EAAE,IAAI,2BAAkB,CAAC,sBAAS,CAAC,IAAI,CAAC,CAAC,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RopidGtfsContainerToken = void 0;
|
|
4
|
-
const RopidGtfsContainerToken = {
|
|
5
|
-
PrecomputedTablesFacade: Symbol(),
|
|
6
|
-
StaticFileRedisRepository: Symbol(),
|
|
7
|
-
RopidGTFSTransformation: Symbol(),
|
|
8
|
-
RopidGtfsFactory: Symbol(),
|
|
9
|
-
RedisPubSubChannel: Symbol(),
|
|
10
|
-
};
|
|
11
|
-
exports.RopidGtfsContainerToken = RopidGtfsContainerToken;
|
|
12
|
-
//# sourceMappingURL=RopidGtfsContainerToken.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RopidGtfsContainerToken.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.ts"],"names":[],"mappings":";;;AAAA,MAAM,uBAAuB,GAAG;IAC5B,uBAAuB,EAAE,MAAM,EAAE;IACjC,yBAAyB,EAAE,MAAM,EAAE;IACnC,uBAAuB,EAAE,MAAM,EAAE;IACjC,gBAAgB,EAAE,MAAM,EAAE;IAC1B,kBAAkB,EAAE,MAAM,EAAE;CAC/B,CAAC;AAEO,0DAAuB"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TimetableWorker = void 0;
|
|
4
|
-
const workers_1 = require("@golemio/core/dist/integration-engine/workers");
|
|
5
|
-
const CheckForNewDataTask_1 = require("./tasks/CheckForNewDataTask");
|
|
6
|
-
const CheckSavedRowsAndReplaceTablesTask_1 = require("./tasks/CheckSavedRowsAndReplaceTablesTask");
|
|
7
|
-
const DownloadDatasetsTask_1 = require("./tasks/DownloadDatasetsTask");
|
|
8
|
-
const RefreshPrecomputedTablesTask_1 = require("./tasks/RefreshPrecomputedTablesTask");
|
|
9
|
-
const TransformAndSaveDataTask_1 = require("./tasks/TransformAndSaveDataTask");
|
|
10
|
-
class TimetableWorker extends workers_1.AbstractWorker {
|
|
11
|
-
constructor() {
|
|
12
|
-
super();
|
|
13
|
-
this.name = "ropidgtfs";
|
|
14
|
-
// Register tasks
|
|
15
|
-
this.registerTask(new CheckForNewDataTask_1.CheckForNewDataTask(this.getQueuePrefix()));
|
|
16
|
-
this.registerTask(new CheckSavedRowsAndReplaceTablesTask_1.CheckSavedRowsAndReplaceTablesTask(this.getQueuePrefix()));
|
|
17
|
-
this.registerTask(new DownloadDatasetsTask_1.DownloadDatasetsTask(this.getQueuePrefix()));
|
|
18
|
-
this.registerTask(new RefreshPrecomputedTablesTask_1.RefreshPrecomputedTablesTask(this.getQueuePrefix()));
|
|
19
|
-
this.registerTask(new TransformAndSaveDataTask_1.TransformAndSaveDataTask(this.getQueuePrefix()));
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.TimetableWorker = TimetableWorker;
|
|
23
|
-
//# sourceMappingURL=TimetableWorker.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TimetableWorker.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.ts"],"names":[],"mappings":";;;AAAA,2EAA+E;AAC/E,qEAAkE;AAClE,mGAAgG;AAChG,uEAAoE;AACpE,uFAAoF;AACpF,+EAA4E;AAE5E,MAAa,eAAgB,SAAQ,wBAAc;IAG/C;QACI,KAAK,EAAE,CAAC;QAHF,SAAI,GAAG,WAAW,CAAC;QAKzB,iBAAiB;QACjB,IAAI,CAAC,YAAY,CAAC,IAAI,yCAAmB,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;QAClE,IAAI,CAAC,YAAY,CAAC,IAAI,uEAAkC,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;QACjF,IAAI,CAAC,YAAY,CAAC,IAAI,2CAAoB,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;QACnE,IAAI,CAAC,YAAY,CAAC,IAAI,2DAA4B,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;QAC3E,IAAI,CAAC,YAAY,CAAC,IAAI,mDAAwB,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;IAC3E,CAAC;CACJ;AAbD,0CAaC"}
|
package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ICheckForNewDataInput } from "./interfaces/ICheckForNewDataInput";
|
|
2
|
-
import { AbstractTask } from "@golemio/core/dist/integration-engine/workers";
|
|
3
|
-
import { CheckForNewDataMessageValidation } from "./schema/CheckForNewDataMessageValidation";
|
|
4
|
-
export declare class CheckForNewDataTask extends AbstractTask<ICheckForNewDataInput> {
|
|
5
|
-
readonly queueName = "checkForNewData";
|
|
6
|
-
readonly queueTtl: number;
|
|
7
|
-
readonly schema: typeof CheckForNewDataMessageValidation;
|
|
8
|
-
private logger;
|
|
9
|
-
private metaModel;
|
|
10
|
-
constructor(queuePrefix: string);
|
|
11
|
-
protected execute(data: ICheckForNewDataInput): Promise<void>;
|
|
12
|
-
}
|
|
@@ -1,61 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.CheckForNewDataTask = void 0;
|
|
13
|
-
const ModuleContainerToken_1 = require("../../../../ioc/ModuleContainerToken");
|
|
14
|
-
const Di_1 = require("../../../ioc/Di");
|
|
15
|
-
const RopidGtfsContainerToken_1 = require("../../../ioc/RopidGtfsContainerToken");
|
|
16
|
-
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
17
|
-
const integration_engine_1 = require("@golemio/core/dist/integration-engine");
|
|
18
|
-
const workers_1 = require("@golemio/core/dist/integration-engine/workers");
|
|
19
|
-
const CheckForNewDataMessageValidation_1 = require("./schema/CheckForNewDataMessageValidation");
|
|
20
|
-
class CheckForNewDataTask extends workers_1.AbstractTask {
|
|
21
|
-
constructor(queuePrefix) {
|
|
22
|
-
super(queuePrefix);
|
|
23
|
-
this.queueName = "checkForNewData";
|
|
24
|
-
this.queueTtl = 19 * 60 * 1000; // 19 minutes
|
|
25
|
-
this.schema = CheckForNewDataMessageValidation_1.CheckForNewDataMessageValidation;
|
|
26
|
-
this.logger = Di_1.RopidGtfsContainer.resolve(CoreToken_1.CoreToken.Logger);
|
|
27
|
-
// MetaData Model
|
|
28
|
-
this.metaModel = Di_1.RopidGtfsContainer.resolve(ModuleContainerToken_1.ModuleContainerToken.RopidGTFSMetadataModel);
|
|
29
|
-
}
|
|
30
|
-
execute(data) {
|
|
31
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
-
let forceRefresh = !!data.forceRefresh;
|
|
33
|
-
const datasets = [];
|
|
34
|
-
const ropidGtfsFactory = Di_1.RopidGtfsContainer.resolve(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGtfsFactory);
|
|
35
|
-
const datasetMap = ropidGtfsFactory.getDatasetMap();
|
|
36
|
-
for (const dataset of Object.keys(datasetMap)) {
|
|
37
|
-
const serverLastModified = yield datasetMap[dataset].datasource.getLastModified();
|
|
38
|
-
const dbLastModified = yield this.metaModel.getLastModified(dataset);
|
|
39
|
-
const isDeployed = yield this.metaModel.isDeployed(dataset);
|
|
40
|
-
if (serverLastModified !== dbLastModified.lastModified || !isDeployed) {
|
|
41
|
-
datasets.push(dataset);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
if (datasets.length && datasets.length !== Object.keys(datasetMap).length) {
|
|
45
|
-
this.logger.error(`RopidGTFS datasets are out of sync`);
|
|
46
|
-
}
|
|
47
|
-
if (datasets.length) {
|
|
48
|
-
yield integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "downloadDatasets", {
|
|
49
|
-
datasets: datasets,
|
|
50
|
-
});
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
this.logger.info("RopidGTFS datasets are up to date");
|
|
54
|
-
if (forceRefresh) {
|
|
55
|
-
yield integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "refreshPrecomputedTables", {});
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
exports.CheckForNewDataTask = CheckForNewDataTask;
|
|
61
|
-
//# sourceMappingURL=CheckForNewDataTask.js.map
|
package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CheckForNewDataTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+EAAoE;AAEpE,wCAA2D;AAC3D,kFAAqF;AAErF,wEAAqE;AAErE,8EAAqE;AACrE,2EAA6E;AAI7E,gGAA6F;AAE7F,MAAa,mBAAoB,SAAQ,sBAAmC;IAQxE,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QARP,cAAS,GAAG,iBAAiB,CAAC;QAC9B,aAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,aAAa;QACxC,WAAM,GAAG,mEAAgC,CAAC;QAOtD,IAAI,CAAC,MAAM,GAAG,uBAAkB,CAAC,OAAO,CAAU,qBAAS,CAAC,MAAM,CAAC,CAAC;QACpE,iBAAiB;QACjB,IAAI,CAAC,SAAS,GAAG,uBAAkB,CAAC,OAAO,CAAyB,2CAAoB,CAAC,sBAAsB,CAAC,CAAC;IACrH,CAAC;IAEe,OAAO,CAAC,IAA2B;;YAC/C,IAAI,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC;YACvC,MAAM,QAAQ,GAAG,EAAE,CAAC;YACpB,MAAM,gBAAgB,GAAG,uBAAkB,CAAC,OAAO,C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ist/integration-engine/workers";
|
|
2
|
-
import { IDatasetsInput } from "./interfaces/IDatasetsInput";
|
|
3
|
-
import { DatasetsInputSchema } from "./schema/DownloadDataInputSchema";
|
|
4
|
-
export declare class CheckSavedRowsAndReplaceTablesTask extends AbstractTask<IDatasetsInput> {
|
|
5
|
-
readonly queueName = "checkSavedRowsAndReplaceTables";
|
|
6
|
-
readonly queueTtl: number;
|
|
7
|
-
readonly schema: typeof DatasetsInputSchema;
|
|
8
|
-
private logger;
|
|
9
|
-
private metaModel;
|
|
10
|
-
private dataCacheManager;
|
|
11
|
-
private precomputeTablesFacade;
|
|
12
|
-
constructor(queuePrefix: string);
|
|
13
|
-
protected execute(data: IDatasetsInput): Promise<void>;
|
|
14
|
-
}
|