@golemio/pid 2.7.4-dev.877125750 → 2.7.4-dev.878737779
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/input-gateway/vehicle-positions/VehiclePositionsController.js +2 -2
- package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGTFSMetadataModel.js +2 -2
- package/dist/integration-engine/ropid-gtfs/RopidGTFSMetadataModel.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopTimesModel.js +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopTimesModel.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGTFSWorker.js +14 -14
- package/dist/integration-engine/ropid-gtfs/RopidGTFSWorker.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/helpers/DataCacheManager.js +1 -1
- package/dist/integration-engine/ropid-gtfs/helpers/DataCacheManager.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/railtrack/tasks/data-access/MetroRailtrackGPSRepository.js +2 -2
- package/dist/integration-engine/ropid-gtfs/workers/railtrack/tasks/data-access/MetroRailtrackGPSRepository.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.js +2 -2
- package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.js.map +1 -1
- package/dist/integration-engine/shared/RopidMetadataModel.js +2 -2
- package/dist/integration-engine/shared/RopidMetadataModel.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsRepository.js +3 -3
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/MetroRunsMessagesRepository.js +2 -2
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/MetroRunsMessagesRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/MetroMessageFilter.d.ts +3 -3
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/MetroMessageFilter.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/interfaces/IMetroRunInputForProcessing.d.ts +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/interfaces/IProcessMetroRunsMessagesInput.d.ts +5 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/schema/MetroTransformedRunsSchema.d.ts +2 -3
- package/dist/integration-engine/vehicle-positions/workers/runs/schema/MetroTransformedRunsSchema.js +2 -2
- package/dist/integration-engine/vehicle-positions/workers/runs/schema/MetroTransformedRunsSchema.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessMetroRunsMessagesTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveBusRunsToDBTask.js +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveBusRunsToDBTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveTramRunsToDBTask.js +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveTramRunsToDBTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessageProcessingTransformation.d.ts +2 -2
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessageProcessingTransformation.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessagesTransformation.js +6 -5
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessagesTransformation.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/data-access/DescriptorRepository.js +2 -2
- package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/data-access/DescriptorRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.js +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsHistoryRepository.js +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsHistoryRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsRepository.d.ts +20 -14
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsRepository.js +30 -22
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsHistoryRepository.js +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsHistoryRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.d.ts +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js +18 -28
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/PositionsMapper.d.ts +4 -3
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/PositionsMapper.js +17 -2
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/PositionsMapper.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsIdGenerator.d.ts +4 -0
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsIdGenerator.js +7 -0
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsIdGenerator.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsMapper.d.ts +4 -3
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsMapper.js +19 -2
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsMapper.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DelayComputationManager.js +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DelayComputationManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/BusDelayAtStop.js +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/BusDelayAtStop.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/TramDelayAtStop.js +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/TramDelayAtStop.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateDelayTask.js +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateDelayTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateGtfsTripIdTask.js +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateGtfsTripIdTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateRunsGtfsTripIdTask.js +15 -5
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateRunsGtfsTripIdTask.js.map +1 -1
- package/dist/output-gateway/pid/middleware/checkTimeFromMiddleware.js +1 -1
- package/dist/output-gateway/pid/middleware/checkTimeFromMiddleware.js.map +1 -1
- package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js +3 -3
- package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/GTFSRouter.js +5 -5
- package/dist/output-gateway/ropid-gtfs/GTFSRouter.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSCalendarModel.js +2 -2
- package/dist/output-gateway/ropid-gtfs/models/GTFSCalendarModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSRoutesModel.js +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSRoutesModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSShapesModel.js +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSShapesModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js +2 -2
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopTimesModel.js +2 -2
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopTimesModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.js +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.js.map +1 -1
- package/dist/output-gateway/vehicle-positions/VehiclePositionsRouter.js +7 -7
- package/dist/output-gateway/vehicle-positions/VehiclePositionsRouter.js.map +1 -1
- package/dist/output-gateway/vehicle-positions/data-access/views/TripWithLastPositionRepository.js +2 -2
- package/dist/output-gateway/vehicle-positions/data-access/views/TripWithLastPositionRepository.js.map +1 -1
- package/dist/schema-definitions/ropid-gtfs/models/StopTimesDto.js +1 -1
- package/dist/schema-definitions/ropid-gtfs/models/StopTimesDto.js.map +1 -1
- package/dist/schema-definitions/vehicle-positions/models/MetroRunsMessagesModel.d.ts +2 -2
- package/dist/schema-definitions/vehicle-positions/models/MetroRunsMessagesModel.js +4 -2
- package/dist/schema-definitions/vehicle-positions/models/MetroRunsMessagesModel.js.map +1 -1
- package/dist/schema-definitions/vehicle-positions/models/PositionDto.d.ts +8 -5
- package/dist/schema-definitions/vehicle-positions/models/PositionDto.js +1 -0
- package/dist/schema-definitions/vehicle-positions/models/PositionDto.js.map +1 -1
- package/dist/schema-definitions/vehicle-positions/models/interfaces/IMetroRunsMessagesModel.d.ts +2 -2
- package/dist/schema-definitions/vehicle-positions/models/interfaces/IPositionDto.d.ts +7 -5
- package/dist/schema-definitions/vehicle-positions/models/interfaces/IPositionDto.js +1 -0
- package/package.json +2 -2
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IProcessMetroRunsMessagesInput } from "../interfaces/IProcessMetroRunsMessagesInput";
|
|
1
|
+
import { IProcessMetroRunsMessage, IProcessMetroRunsMessagesInput } from "../interfaces/IProcessMetroRunsMessagesInput";
|
|
3
2
|
export declare class MetroTransformedRunsValidationSchema implements IProcessMetroRunsMessagesInput {
|
|
4
3
|
routeName: string;
|
|
5
|
-
messages:
|
|
4
|
+
messages: IProcessMetroRunsMessage[];
|
|
6
5
|
}
|
package/dist/integration-engine/vehicle-positions/workers/runs/schema/MetroTransformedRunsSchema.js
CHANGED
|
@@ -43,8 +43,8 @@ __decorate([
|
|
|
43
43
|
__metadata("design:type", Number)
|
|
44
44
|
], MetroTransformedRunMessagesValidationSchema.prototype, "delay_origin", void 0);
|
|
45
45
|
__decorate([
|
|
46
|
-
(0, class_validator_1.
|
|
47
|
-
__metadata("design:type",
|
|
46
|
+
(0, class_validator_1.IsISO8601)(),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
48
|
], MetroTransformedRunMessagesValidationSchema.prototype, "actual_position_timestamp_scheduled", void 0);
|
|
49
49
|
class MetroTransformedRunsValidationSchema {
|
|
50
50
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetroTransformedRunsSchema.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/runs/schema/MetroTransformedRunsSchema.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"MetroTransformedRunsSchema.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/runs/schema/MetroTransformedRunsSchema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mFAAmE;AACnE,+EAA6H;AAG7H,MAAM,2CAA2C;CAwBhD;AAtBG;IADC,IAAA,0BAAQ,GAAE;;+EACS;AAGpB;IADC,IAAA,2BAAS,GAAE;;sFACe;AAG3B;IADC,IAAA,0BAAQ,GAAE;;+FACyB;AAGpC;IADC,IAAA,0BAAQ,GAAE;;0FACoB;AAG/B;IADC,IAAA,0BAAQ,GAAE;;iFACW;AAGtB;IADC,IAAA,0BAAQ,GAAE;;6EACO;AAGlB;IADC,IAAA,0BAAQ,GAAE;;iFACW;AAGtB;IADC,IAAA,2BAAS,GAAE;;wGACiC;AAGjD,MAAa,oCAAoC;CAShD;AAPG;IADC,IAAA,0BAAQ,GAAE;;uEACQ;AAMnB;IAJC,IAAA,yBAAO,GAAE;IACT,IAAA,0BAAQ,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACxB,IAAA,gCAAc,GAAE;IAChB,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,2CAA2C,CAAC;;sEAClB;AAR1C,oFASC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProcessMetroRunsMessagesTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/runs/tasks/ProcessMetroRunsMessagesTask.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oEAA2E;AAC3E,wIAA6H;AAE7H,iGAAsH;AACtH,yFAA8G;AAE9G,uHAGyG;AACzG,2FAA0D;
|
|
1
|
+
{"version":3,"file":"ProcessMetroRunsMessagesTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/runs/tasks/ProcessMetroRunsMessagesTask.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oEAA2E;AAC3E,wIAA6H;AAE7H,iGAAsH;AACtH,yFAA8G;AAE9G,uHAGyG;AACzG,2FAA0D;AAC1D,8EAA2F;AAC3F,2EAAoE;AACpE,8EAA2E;AAC3E,sEAAmE;AAEnE,qFAA4F;AAC5F,0HAAuH;AAEvH,MAAa,4BAA6B,SAAQ,iCAA4C;IAa1F,YAAY,WAAmB;QAC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IAAI,GAAG,MAAM,IAAI,CAAC,wBAAwB,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;YACjF,IAAI,CAAC,IAAI,EAAE;gBACP,OAAO;aACV;YAED,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,0BAA0B,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAClG,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE;gBAC7B,aAAG,CAAC,OAAO,CAAC,8CAA8C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;gBAC9F,OAAO;aACV;YAED,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,cAAc,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC/F,IAAI,QAAQ,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE;gBAClC,MAAM,iCAAY,CAAC,qBAAqB,CACpC,GAAG,2BAAM,CAAC,oBAAoB,IAAI,oCAAgB,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,EACvE,aAAa,EACb,QAAQ,CACX,CAAC;aACL;QACL,CAAC;KAAA;CACJ;AAjED,oEAiEC"}
|
|
@@ -31,7 +31,7 @@ class SaveBusRunsToDBTask extends workers_1.AbstractTask {
|
|
|
31
31
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32
32
|
const timestamp = msgProperties === null || msgProperties === void 0 ? void 0 : msgProperties.timestamp;
|
|
33
33
|
if (!timestamp) {
|
|
34
|
-
throw new golemio_errors_1.
|
|
34
|
+
throw new golemio_errors_1.GeneralError(`Missing bus run message timestamp: ${JSON.stringify(data)}`, this.constructor.name);
|
|
35
35
|
}
|
|
36
36
|
const transformedData = yield this.messagesTransformation.transform({ data: data.M.V, timestamp });
|
|
37
37
|
for (const element of transformedData) {
|
package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveBusRunsToDBTask.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SaveBusRunsToDBTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/runs/tasks/SaveBusRunsToDBTask.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2EAA6E;AAC7E,
|
|
1
|
+
{"version":3,"file":"SaveBusRunsToDBTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/runs/tasks/SaveBusRunsToDBTask.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2EAA6E;AAC7E,6EAAwE;AAExE,8EAA2E;AAC3E,8EAA2E;AAE3E,iEAAwE;AACxE,0GAAuG;AAEvG,MAAa,mBAAoB,SAAQ,sBAA8B;IASnE,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QATP,cAAS,GAAG,iBAAiB,CAAC;QAC9B,aAAQ,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,YAAY;QACtC,WAAM,GAAG,6CAA0B,CAAC;QAQhD,IAAI,CAAC,sBAAsB,GAAG,IAAI,mEAAgC,EAAE,CAAC;QACrE,IAAI,CAAC,cAAc,GAAG,IAAI,2CAAoB,EAAE,CAAC;QACjD,IAAI,CAAC,gBAAgB,GAAG,IAAI,+CAAsB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAC5E,CAAC;IAEe,OAAO,CAAC,IAAsB,EAAE,aAAiC;;;YAC7E,MAAM,SAAS,GAAG,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,SAAS,CAAC;YAC3C,IAAI,CAAC,SAAS,EAAE;gBACZ,MAAM,IAAI,6BAAY,CAAC,sCAAsC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;aAC/G;YAED,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;YACnG,KAAK,MAAM,OAAO,IAAI,eAAe,EAAE;gBACnC,yDAAyD;gBACzD,IAAI,CAAA,MAAA,OAAO,CAAC,GAAG,CAAC,QAAQ,0CAAE,MAAM,IAAG,CAAC,EAAE;oBAClC,SAAS;iBACZ;gBAED,MAAM,IAAI,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;aAC9D;;KACJ;CACJ;AAhCD,kDAgCC"}
|
package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveTramRunsToDBTask.js
CHANGED
|
@@ -30,7 +30,7 @@ class SaveTramRunsToDBTask extends workers_1.AbstractTask {
|
|
|
30
30
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31
31
|
const timestamp = msgProperties === null || msgProperties === void 0 ? void 0 : msgProperties.timestamp;
|
|
32
32
|
if (!timestamp) {
|
|
33
|
-
throw new golemio_errors_1.
|
|
33
|
+
throw new golemio_errors_1.GeneralError(`Missing tram run message timestamp: ${JSON.stringify(data)}`, this.constructor.name);
|
|
34
34
|
}
|
|
35
35
|
const transformedData = yield this.messagesTransformation.transform({ data: data.M.V, timestamp }, true);
|
|
36
36
|
for (const element of transformedData) {
|
package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveTramRunsToDBTask.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SaveTramRunsToDBTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/runs/tasks/SaveTramRunsToDBTask.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2EAA6E;AAC7E,
|
|
1
|
+
{"version":3,"file":"SaveTramRunsToDBTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/runs/tasks/SaveTramRunsToDBTask.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2EAA6E;AAC7E,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|
2
2
|
import { IVehiclePositionsSchedule } from "../../vehicle-positions/interfaces/VPInterfaces";
|
|
3
|
-
import { IMetroRunsMessagesModel } from "../../../../../schema-definitions/vehicle-positions/models/interfaces/IMetroRunsMessagesModel";
|
|
4
3
|
import { BaseTransformation, ITransformation } from "@golemio/core/dist/integration-engine/transformations";
|
|
5
4
|
import { IMetroRunInputForProcessing } from "../interfaces/IMetroRunInputForProcessing";
|
|
5
|
+
import { IProcessMetroRunsMessage } from "../interfaces/IProcessMetroRunsMessagesInput";
|
|
6
6
|
interface ITransformationInput {
|
|
7
|
-
message:
|
|
7
|
+
message: IProcessMetroRunsMessage;
|
|
8
8
|
gpsData: IAggregatedRailtrackGPSData | null;
|
|
9
9
|
}
|
|
10
10
|
interface ITransformationOutput {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetroRunsMessageProcessingTransformation.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessageProcessingTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"MetroRunsMessageProcessingTransformation.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessageProcessingTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,2EAAoE;AACpE,2FAA4G;AAC5G,kEAA+D;AAc/D,MAAa,wCAAyC,SAAQ,oCAAkB;IAAhF;;QACW,SAAI,GAAG,2BAA2B,CAAC;QAEnC,cAAS,GAAG,CAAO,EAAE,OAAO,EAAE,OAAO,EAAwB,EAA8C,EAAE;YAChH,MAAM,WAAW,GAAG,IAAI,CAAC,2BAA2B,CAAC,OAAO,CAAC,CAAC;YAC9D,IAAI,CAAC,WAAW,EAAE;gBACd,OAAO;aACV;YAED,MAAM,QAAQ,GAAG,IAAI,CAAC,wBAAwB,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;YAC9E,IAAI,QAAQ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G,OAAO;SACV;QAED,OAAO;YACH,gBAAgB,EAAE,OAAO,CAAC,iBAAiB;YAC3C,kBAAkB,EAAE,OAAO,CAAC,mCAAmC;YAC/D,OAAO,EAAE,WAAW,CAAC,QAAQ;YAC7B,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,UAAoB,CAAC;YAC5D,uBAAuB,EAAE,OAAO,CAAC,0BAA0B;YAC3D,kBAAkB,EAAE,OAAO,CAAC,qBAAqB;YACjD,WAAW,EAAE,OAAO,CAAC,YAAY;YACjC,WAAW;SACd,CAAC;IACN,CAAC;CACJ;AAlED,4FAkEC"}
|
|
@@ -22,18 +22,19 @@ class MetroRunsMessagesTransformation extends transformations_1.BaseTransformati
|
|
|
22
22
|
return Promise.resolve(dto);
|
|
23
23
|
};
|
|
24
24
|
this.transformElement = ({ messageData, trainData }) => {
|
|
25
|
-
const
|
|
26
|
-
const messageTimestamp = new Date(messageData.tm)
|
|
25
|
+
const delayOriginSeconds = parseInt(trainData.$.odch);
|
|
26
|
+
const messageTimestamp = new Date(messageData.tm);
|
|
27
|
+
const scheduledTimestamp = new Date(messageTimestamp);
|
|
27
28
|
// delay is in seconds, positive number means the train is ahead of time
|
|
28
|
-
|
|
29
|
+
scheduledTimestamp.setSeconds(scheduledTimestamp.getSeconds() + delayOriginSeconds);
|
|
29
30
|
return {
|
|
30
31
|
route_name: messageData.linka,
|
|
31
|
-
message_timestamp:
|
|
32
|
+
message_timestamp: messageTimestamp,
|
|
32
33
|
train_set_number_scheduled: trainData.$.csp.trimStart(),
|
|
33
34
|
train_set_number_real: trainData.$.csr.trimStart(),
|
|
34
35
|
train_number: trainData.$.cv,
|
|
35
36
|
track_id: trainData.$.ko,
|
|
36
|
-
delay_origin:
|
|
37
|
+
delay_origin: delayOriginSeconds,
|
|
37
38
|
actual_position_timestamp_scheduled: scheduledTimestamp,
|
|
38
39
|
};
|
|
39
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetroRunsMessagesTransformation.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessagesTransformation.ts"],"names":[],"mappings":";;;AACA,2FAA4G;AAQ5G,MAAa,+BAAgC,SAAQ,oCAAkB;IAAvE;;QACW,SAAI,GAAG,kBAAkB,CAAC;QAE1B,cAAS,GAAG,CAAC,IAAqB,EAAqC,EAAE;YAC5E,IAAI,EAAE,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;YACjD,IAAI,CAAC,SAAS,EAAE;gBACZ,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;aAC9B;YAED,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;gBAC3B,SAAS,GAAG,CAAC,SAAS,CAAC,CAAC;aAC3B;YAED,MAAM,GAAG,GAA6B,EAAE,CAAC;YACzC,KAAK,MAAM,aAAa,IAAI,SAAS,EAAE;gBACnC,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC,CAAC;gBACjF,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;aACrB;YAED,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAChC,CAAC,CAAC;QAEQ,qBAAgB,GAAG,CAAC,EAAE,WAAW,EAAE,SAAS,EAAqB,EAA0B,EAAE;YACnG,MAAM,
|
|
1
|
+
{"version":3,"file":"MetroRunsMessagesTransformation.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessagesTransformation.ts"],"names":[],"mappings":";;;AACA,2FAA4G;AAQ5G,MAAa,+BAAgC,SAAQ,oCAAkB;IAAvE;;QACW,SAAI,GAAG,kBAAkB,CAAC;QAE1B,cAAS,GAAG,CAAC,IAAqB,EAAqC,EAAE;YAC5E,IA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E,SAAS,CAAC,CAAC,CAAC,EAAE;gBAC5B,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE;gBACxB,YAAY,EAAE,kBAAkB;gBAChC,mCAAmC,EAAE,kBAAkB;aAChC,CAAC;QAChC,CAAC,CAAC;IACN,CAAC;CAAA;AAxCD,0EAwCC"}
|
|
@@ -72,7 +72,7 @@ let DescriptorRepository = DescriptorRepository_1 = class DescriptorRepository e
|
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
catch (err) {
|
|
75
|
-
const exception = new golemio_errors_1.
|
|
75
|
+
const exception = new golemio_errors_1.GeneralError(`[${DescriptorRepository_1.REPOSITORY_NAME}] Could not save data: ${err.message}`, this.constructor.name, err);
|
|
76
76
|
this.logger.error(exception);
|
|
77
77
|
throw exception;
|
|
78
78
|
}
|
|
@@ -88,7 +88,7 @@ let DescriptorRepository = DescriptorRepository_1 = class DescriptorRepository e
|
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
90
|
catch (err) {
|
|
91
|
-
throw new golemio_errors_1.
|
|
91
|
+
throw new golemio_errors_1.GeneralError("Error while purging old data", this.constructor.name, err);
|
|
92
92
|
}
|
|
93
93
|
});
|
|
94
94
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DescriptorRepository.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-descriptors/data-access/DescriptorRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mEAAuC;AACvC,yFAAkE;AAGlE,6FAA0F;AAC1F,yEAAqF;AACrF,
|
|
1
|
+
{"version":3,"file":"DescriptorRepository.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-descriptors/data-access/DescriptorRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mEAAuC;AACvC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,UAAU,EAAE;4BACR,CAAC,cAAE,CAAC,EAAE,CAAC,EAAE,mBAAS,CAAC,OAAO,CAAC,qBAAqB,KAAK,SAAS,CAAC;yBAClE;qBACJ;iBACJ,CAAC,CAAC;aACN;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAAC,8BAA8B,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;aACtF;QACL,CAAC,CAAA,CAAC;IAjCF,CAAC;CAkCJ,CAAA;AAhDkB,oCAAe,GAAG,wBAAyB,CAAA;AADjD,oBAAoB;IADhC,IAAA,qBAAU,GAAE;IAKI,WAAA,IAAA,iBAAM,EAAC,+BAAc,CAAC,MAAM,CAAC,CAAA;;GAJjC,oBAAoB,CAiDhC;AAjDY,oDAAoB"}
|
|
@@ -64,7 +64,7 @@ let DescriptorTransformation = class DescriptorTransformation extends transforma
|
|
|
64
64
|
case VehicleDescriptorEnums_1.VehicleDescriptorTractionEnum.Tram:
|
|
65
65
|
return RouteTypeEnums_1.GTFSRouteTypeEnum.TRAM;
|
|
66
66
|
default:
|
|
67
|
-
throw new golemio_errors_1.
|
|
67
|
+
throw new golemio_errors_1.GeneralError(`${this.name}: unknown traction: ${traction}`, this.constructor.name);
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DescriptorTransformation.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.ts"],"names":[],"mappings":";;;;;;;;;AAEA,2FAA4G;AAC5G,
|
|
1
|
+
{"version":3,"file":"DescriptorTransformation.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.ts"],"names":[],"mappings":";;;;;;;;;AAEA,2FAA4G;AAC5G,6EAAwE;AACxE,iEAAgE;AAChE,0EAA+D;AAC/D,0FAA+G;A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ryRepository extends integration_engine_1.PostgresModel {
|
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
catch (err) {
|
|
74
|
-
throw new golemio_errors_1.
|
|
74
|
+
throw new golemio_errors_1.GeneralError("Error while purging old data", this.constructor.name, err);
|
|
75
75
|
}
|
|
76
76
|
});
|
|
77
77
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PositionsHistoryRepository.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsHistoryRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mEAAuC;AACvC,2FAA0D;AAC1D,wGAAwE;AACxE,8EAA8E;AAC9E,
|
|
1
|
+
{"version":3,"file":"PositionsHistoryRepository.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsHistoryRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mEAAuC;AACvC,2FAA0D;AAC1D,wGAAwE;AACxE,8EAA8E;AAC9E,6EAAwE;AACxE,mFAAkF;AAClF,iFAAoE;AAEpE,MAAa,0BAA2B,SAAQ,kCAAa;IACzD;QACI,KAAK,CACD,0BAA0B,EAC1B;YACI,yBAAyB,EAAE,yBAAW,CAAC,cAAc;YACrD,WAAW,EAAE,oCAAgB,CAAC,SAAS,CAAC,kBAAkB;YAC1D,QAAQ,EAAE,iBAAS;YACnB,UAAU,EAAE,YAAY;YACxB,2BAA2B,EAAE;gBACzB,OAAO,EAAE;oBACL;wBACI,MAAM,EAAE,CAAC,UAAU,CAAC;wBACpB,IAAI,EAAE,qCAAqC;qBAC9C;oBACD;wBACI,MAAM,EAAE,CAAC,aAAa,CAAC;wBACvB,IAAI,EAAE,wCAAwC;qBACjD;iBACJ;aACJ;SACJ,EACD,IAAI,uCAAmB,CAAC,oCAAgB,CAAC,SAAS,CAAC,IAAI,GAAG,gBAAgB,EAAE,yBAAW,CAAC,UAAU,CAAC,CACtG,CAAC;QAGC,wBAAmB,GAAG,CAAO,KAAa,EAAmB,EAAE;YAClE,IAAI;gBACA,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;oBACrC,KAAK,EAAE;wBACH,UAAU,EAAE;4BACR,CAAC,cAAE,CAAC,EAAE,CAAC,EAAE,mBAAS,CAAC,OAAO,CAAC,qBAAqB,KAAK,SAAS,CAAC;yBAClE;qBACJ;iBACJ,CAAC,CAAC;aACN;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAAC,8BAA8B,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;aACtF;QACL,CAAC,CAAA,CAAC;IAdF,CAAC;CAeJ;AAvCD,gEAuCC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { IGtfsRunTripCache } from "../../../../ropid-gtfs/interfaces/IGtfsRunTripCache";
|
|
2
2
|
import { IMetroRunInputForProcessing } from "../../runs/interfaces/IMetroRunInputForProcessing";
|
|
3
|
+
import { IPositionDto } from "../../../../../schema-definitions/vehicle-positions/models/interfaces/IPositionDto";
|
|
3
4
|
import { VPTripsNonNullableModel } from "../../../../../schema-definitions/vehicle-positions/models/interfaces/IVPTripsModel";
|
|
4
5
|
import { IVPTripsPositionAttributes } from "../../../../../schema-definitions/vehicle-positions/models/interfaces/IVPTripsPositionAttributes";
|
|
6
|
+
import { PositionDto } from "../../../../../schema-definitions/vehicle-positions/models/PositionDto";
|
|
5
7
|
import { IModel, PostgresModel } from "@golemio/core/dist/integration-engine/models";
|
|
6
|
-
import {
|
|
7
|
-
import Sequelize from "@golemio/core/dist/shared/sequelize";
|
|
8
|
+
import Sequelize, { ModelStatic } from "@golemio/core/dist/shared/sequelize";
|
|
8
9
|
import { IUpdateRunsGtfsTripInput } from "../interfaces/IUpdateRunsGtfsTripInput";
|
|
9
10
|
export interface ITripAttributes extends Pick<VPTripsNonNullableModel, "id" | "gtfs_trip_id" | "gtfs_route_type" | "start_timestamp" | "end_timestamp" | "agency_name_scheduled" | "start_cis_stop_id" | "last_position_context"> {
|
|
10
11
|
}
|
|
@@ -12,23 +13,28 @@ export interface ITripPositions extends ITripAttributes {
|
|
|
12
13
|
positions: IVPTripsPositionAttributes[];
|
|
13
14
|
}
|
|
14
15
|
export declare class PositionsRepository extends PostgresModel implements IModel {
|
|
15
|
-
|
|
16
|
-
name: string;
|
|
17
|
-
/** The Sequelize Model */
|
|
18
|
-
sequelizeModel: Sequelize.ModelCtor<any>;
|
|
19
|
-
/** The Sequelize Model for temporary table */
|
|
20
|
-
protected tmpSequelizeModel: Sequelize.ModelCtor<any> | null;
|
|
21
|
-
/** Validation helper */
|
|
22
|
-
protected validator: IValidator;
|
|
23
|
-
/** Type/Strategy of saving the data */
|
|
24
|
-
protected savingType: "insertOnly" | "insertOrUpdate";
|
|
25
|
-
/** Associated vehiclepositions_trips Model for updating the delay */
|
|
16
|
+
sequelizeModel: ModelStatic<PositionDto>;
|
|
26
17
|
protected tripsModel: Sequelize.ModelCtor<any>;
|
|
27
18
|
constructor();
|
|
19
|
+
/**
|
|
20
|
+
* Get all trips with positions for given trip ids. Positions are ordered by created_at instead of origin_timestamp
|
|
21
|
+
* to ensure they are processed by the same order they are created
|
|
22
|
+
* (sometimes TCP common positions are received out of order)
|
|
23
|
+
*
|
|
24
|
+
* Example of processing of mismatched TCP common positions:
|
|
25
|
+
* Batch 1 - TCP position (event T) with origin_timestamp 10:00:01, created_at 10:00:04, not last position
|
|
26
|
+
* (position is at_stop, last stop sequence is 2, delay at last stop is null, is not served to the output API)
|
|
27
|
+
* Batch 1 - TCP position (event O) with origin_timestamp 10:00:00, created_at 10:00:05, last position
|
|
28
|
+
* (position is on_track, last stop sequence is 2, delay at last stop is 10 and is served to the output API)
|
|
29
|
+
* Batch 2 - TCP position (event T) with origin_timestamp 10:01:00, created_at 10:01:04, last position
|
|
30
|
+
* (position is on_track, last stop sequence is 2, delay at last stop is 10 and is served to the output API)
|
|
31
|
+
* Batch 3 - TCP position (event 0) with origin_timestamp 10:01:40, created_at 10:01:44, last position
|
|
32
|
+
* (position is on_track, last stop sequence is 3, delay at last stop is 20 and is served to the output API)
|
|
33
|
+
*/
|
|
28
34
|
getPositionsForUpdateDelay: (tripIds: string[]) => Promise<ITripPositions[]>;
|
|
29
35
|
bulkUpdate: (data: any[]) => Promise<any>;
|
|
30
36
|
upsertCommonRunPosition: ({ run, run_message }: IUpdateRunsGtfsTripInput, gtfsTrip: IGtfsRunTripCache, isCurrent?: boolean) => Promise<any>;
|
|
31
37
|
upsertMetroRunPosition: (runInput: IMetroRunInputForProcessing, gtfsTrip: IGtfsRunTripCache, isCurrent?: boolean) => Promise<any>;
|
|
32
38
|
deleteNHoursOldData: (hours: number) => Promise<number>;
|
|
33
|
-
createNotPublic: (
|
|
39
|
+
createNotPublic: (positionDto: Partial<IPositionDto>) => Promise<PositionDto>;
|
|
34
40
|
}
|
|
@@ -45,7 +45,6 @@ const helpers_1 = require("@golemio/core/dist/integration-engine/helpers");
|
|
|
45
45
|
const models_2 = require("@golemio/core/dist/integration-engine/models");
|
|
46
46
|
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
47
47
|
const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
|
|
48
|
-
const moment_timezone_1 = __importDefault(require("@golemio/core/dist/shared/moment-timezone"));
|
|
49
48
|
const sequelize_1 = __importStar(require("@golemio/core/dist/shared/sequelize"));
|
|
50
49
|
const const_2 = require("../../../../../const");
|
|
51
50
|
const PositionsMapper_1 = __importDefault(require("./helpers/PositionsMapper"));
|
|
@@ -69,6 +68,21 @@ class PositionsRepository extends models_2.PostgresModel {
|
|
|
69
68
|
],
|
|
70
69
|
},
|
|
71
70
|
}, new golemio_validator_1.JSONSchemaValidator(vehicle_positions_1.VehiclePositions.positions.name + "ModelValidator", PositionDto_1.PositionDto.jsonSchema));
|
|
71
|
+
/**
|
|
72
|
+
* Get all trips with positions for given trip ids. Positions are ordered by created_at instead of origin_timestamp
|
|
73
|
+
* to ensure they are processed by the same order they are created
|
|
74
|
+
* (sometimes TCP common positions are received out of order)
|
|
75
|
+
*
|
|
76
|
+
* Example of processing of mismatched TCP common positions:
|
|
77
|
+
* Batch 1 - TCP position (event T) with origin_timestamp 10:00:01, created_at 10:00:04, not last position
|
|
78
|
+
* (position is at_stop, last stop sequence is 2, delay at last stop is null, is not served to the output API)
|
|
79
|
+
* Batch 1 - TCP position (event O) with origin_timestamp 10:00:00, created_at 10:00:05, last position
|
|
80
|
+
* (position is on_track, last stop sequence is 2, delay at last stop is 10 and is served to the output API)
|
|
81
|
+
* Batch 2 - TCP position (event T) with origin_timestamp 10:01:00, created_at 10:01:04, last position
|
|
82
|
+
* (position is on_track, last stop sequence is 2, delay at last stop is 10 and is served to the output API)
|
|
83
|
+
* Batch 3 - TCP position (event 0) with origin_timestamp 10:01:40, created_at 10:01:44, last position
|
|
84
|
+
* (position is on_track, last stop sequence is 3, delay at last stop is 20 and is served to the output API)
|
|
85
|
+
*/
|
|
72
86
|
this.getPositionsForUpdateDelay = (tripIds) => __awaiter(this, void 0, void 0, function* () {
|
|
73
87
|
// TODO - check that origin_time is not duplicate for tracking == 2.
|
|
74
88
|
// const originTimeColumn = `"vehiclepositions_positions"."origin_time"`;
|
|
@@ -119,7 +133,7 @@ class PositionsRepository extends models_2.PostgresModel {
|
|
|
119
133
|
},
|
|
120
134
|
],
|
|
121
135
|
order: [
|
|
122
|
-
[{ model: this.sequelizeModel, as: "position" }, "
|
|
136
|
+
[{ model: this.sequelizeModel, as: "position" }, "created_at", "ASC"],
|
|
123
137
|
[{ model: this.sequelizeModel, as: "position" }, "tracking", "DESC"],
|
|
124
138
|
],
|
|
125
139
|
raw: true,
|
|
@@ -174,7 +188,7 @@ class PositionsRepository extends models_2.PostgresModel {
|
|
|
174
188
|
}, []);
|
|
175
189
|
}
|
|
176
190
|
catch (err) {
|
|
177
|
-
throw new golemio_errors_1.
|
|
191
|
+
throw new golemio_errors_1.GeneralError(`Error while transforming data from db for batch. Trip count ${results.length}.`, this.name, err);
|
|
178
192
|
}
|
|
179
193
|
});
|
|
180
194
|
this.bulkUpdate = (data) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -196,7 +210,7 @@ class PositionsRepository extends models_2.PostgresModel {
|
|
|
196
210
|
catch (err) {
|
|
197
211
|
helpers_1.log.error(err);
|
|
198
212
|
yield transaction.rollback();
|
|
199
|
-
throw new golemio_errors_1.
|
|
213
|
+
throw new golemio_errors_1.GeneralError("Error while saving to database.", this.name, err);
|
|
200
214
|
}
|
|
201
215
|
}));
|
|
202
216
|
const records = yield Promise.all(promises);
|
|
@@ -215,7 +229,7 @@ class PositionsRepository extends models_2.PostgresModel {
|
|
|
215
229
|
return record.get({ plain: true });
|
|
216
230
|
}
|
|
217
231
|
catch (err) {
|
|
218
|
-
throw new golemio_errors_1.
|
|
232
|
+
throw new golemio_errors_1.GeneralError("upsertCommonRunPosition: Error while saving to database.", this.name, err);
|
|
219
233
|
}
|
|
220
234
|
});
|
|
221
235
|
this.upsertMetroRunPosition = (runInput, gtfsTrip, isCurrent = true) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -226,7 +240,7 @@ class PositionsRepository extends models_2.PostgresModel {
|
|
|
226
240
|
return record.get({ plain: true });
|
|
227
241
|
}
|
|
228
242
|
catch (err) {
|
|
229
|
-
throw new golemio_errors_1.
|
|
243
|
+
throw new golemio_errors_1.GeneralError("upsertMetroRunPosition: Error while saving to database.", this.name, err);
|
|
230
244
|
}
|
|
231
245
|
});
|
|
232
246
|
this.deleteNHoursOldData = (hours) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -240,24 +254,18 @@ class PositionsRepository extends models_2.PostgresModel {
|
|
|
240
254
|
});
|
|
241
255
|
}
|
|
242
256
|
catch (err) {
|
|
243
|
-
throw new golemio_errors_1.
|
|
257
|
+
throw new golemio_errors_1.GeneralError("Error while purging old data", this.constructor.name, err);
|
|
244
258
|
}
|
|
245
259
|
});
|
|
246
|
-
this.createNotPublic = (
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
state_process: const_2.StateProcessEnum.PROCESSED,
|
|
256
|
-
this_stop_id: input.run_message.actual_stop_asw_id,
|
|
257
|
-
tracking: 2,
|
|
258
|
-
trips_id: id,
|
|
259
|
-
tcp_event: input.run_message.events,
|
|
260
|
-
}, { returning: true });
|
|
260
|
+
this.createNotPublic = (positionDto) => __awaiter(this, void 0, void 0, function* () {
|
|
261
|
+
try {
|
|
262
|
+
return yield this.sequelizeModel.create(positionDto, {
|
|
263
|
+
returning: true,
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
catch (err) {
|
|
267
|
+
throw new golemio_errors_1.GeneralError("createNotPublic: error while saving data", this.name, err);
|
|
268
|
+
}
|
|
261
269
|
});
|
|
262
270
|
this.tripsModel = connectors_1.PostgresConnector.getConnection().define(models_1.VPTripsModel.TABLE_NAME, models_1.VPTripsModel.attributeModel, {
|
|
263
271
|
schema: const_1.PG_SCHEMA,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PositionsRepository.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,mEAAuC;AACvC,2FAA0D;AAC1D,uFAA6D;
|
|
1
|
+
{"version":3,"file":"PositionsRepository.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,mEAAuC;AACvC,2FAA0D;AAC1D,uFAA6D;AAI7D,wGAAwE;AACxE,iFA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CAAC,0CAA0C,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;aACtF;QACL,CAAC,CAAA,CAAC;QArOE,IAAI,CAAC,UAAU,GAAG,8BAAiB,CAAC,aAAa,EAAE,CAAC,MAAM,CAAC,qBAAY,CAAC,UAAU,EAAE,qBAAY,CAAC,cAAc,EAAE;YAC7G,MAAM,EAAE,iBAAS;SACpB,CAAC,CAAC;QACH,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC9F,CAAC;CAkOJ;AAjQD,kDAiQC"}
|
|
@@ -35,7 +35,7 @@ class TripsHistoryRepository extends integration_engine_1.PostgresModel {
|
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
catch (err) {
|
|
38
|
-
throw new golemio_errors_1.
|
|
38
|
+
throw new golemio_errors_1.GeneralError("Error while purging old data", this.constructor.name, err);
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TripsHistoryRepository.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsHistoryRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mEAAuC;AACvC,uFAA6D;AAC7D,8EAA8E;AAC9E,
|
|
1
|
+
{"version":3,"file":"TripsHistoryRepository.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsHistoryRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mEAAuC;AACvC,uFAA6D;AAC7D,8EAA8E;AAC9E,6EAAwE;AACxE,mFAAkF;AAClF,mEAAoE;AAEpE,MAAa,sBAAuB,SAAQ,kCAAa;IACrD;QACI,KAAK,CACD,0BAA0B,EAC1B;YACI,WAAW,EAAE,qBAAY,CAAC,kBAAkB;YAC5C,QAAQ,EAAE,iBAAS;YACnB,yBAAyB,EAAE,qBAAY,CAAC,cAAc;YACtD,UAAU,EAAE,gBAAgB;SAC/B,EACD,IAAI,uCAAmB,CAAC,mCAAmC,EAAE,qBAAY,CAAC,UAAU,CAAC,CACxF,CAAC;QAGC,wBAAmB,GAAG,CAAO,KAAa,EAAmB,EAAE;YAClE,IAAI;gBACA,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;oBACrC,KAAK,EAAE;wBACH,UAAU,EAAE;4BACR,CAAC,cAAE,CAAC,EAAE,CAAC,EAAE,qBAAS,CAAC,OAAO,CAAC,qBAAqB,KAAK,SAAS,CAAC;yBAClE;qBACJ;iBACJ,CAAC,CAAC;aACN;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAAC,8BAA8B,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;aACtF;QACL,CAAC,CAAA,CAAC;IAdF,CAAC;CAeJ;AA3BD,wDA2BC"}
|
|
@@ -104,7 +104,7 @@ export declare class TripsRepository extends PostgresModel implements IModel {
|
|
|
104
104
|
findAll: (options: Sequelize.FindOptions<any> | undefined) => Promise<any>;
|
|
105
105
|
private findGTFSTripIdBasic;
|
|
106
106
|
private findGTFSTripIdsTrain;
|
|
107
|
-
upsertNotPublic: (
|
|
107
|
+
upsertNotPublic: (tripDto: Partial<IVPTripsModel>) => Promise<void>;
|
|
108
108
|
/**
|
|
109
109
|
* Return all valid trips for GTFS Realtime feed
|
|
110
110
|
*
|
|
@@ -47,9 +47,6 @@ const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator
|
|
|
47
47
|
const moment_timezone_1 = __importDefault(require("@golemio/core/dist/shared/moment-timezone"));
|
|
48
48
|
const sequelize_1 = __importStar(require("@golemio/core/dist/shared/sequelize"));
|
|
49
49
|
const const_2 = require("../../../../../const");
|
|
50
|
-
const RouteTypeEnums_1 = require("../../../../../helpers/RouteTypeEnums");
|
|
51
|
-
const DPPUtils_1 = __importDefault(require("../helpers/DPPUtils"));
|
|
52
|
-
const ProviderSourceTypeEnum_1 = require("../helpers/ProviderSourceTypeEnum");
|
|
53
50
|
const RawQueryProvider_1 = require("./helpers/RawQueryProvider");
|
|
54
51
|
const TripsMapper_1 = __importDefault(require("./helpers/TripsMapper"));
|
|
55
52
|
const PositionsRepository_1 = require("./PositionsRepository");
|
|
@@ -73,14 +70,14 @@ class TripsRepository extends models_2.PostgresModel {
|
|
|
73
70
|
yield this.validator.Validate(data);
|
|
74
71
|
}
|
|
75
72
|
catch (err) {
|
|
76
|
-
throw new golemio_errors_1.
|
|
73
|
+
throw new golemio_errors_1.GeneralError("Error while validating data.", this.name, err);
|
|
77
74
|
}
|
|
78
75
|
}
|
|
79
76
|
else {
|
|
80
77
|
helpers_1.log.warn(this.name + ": Model validator is not set.");
|
|
81
78
|
}
|
|
82
79
|
if (useTmpTable) {
|
|
83
|
-
throw new golemio_errors_1.
|
|
80
|
+
throw new golemio_errors_1.GeneralError("Saving to tmp table is not implemented for this model.", this.name);
|
|
84
81
|
}
|
|
85
82
|
const connection = connectors_1.PostgresConnector.getConnection();
|
|
86
83
|
const trips = Array.isArray(data) ? data : [data];
|
|
@@ -110,7 +107,7 @@ class TripsRepository extends models_2.PostgresModel {
|
|
|
110
107
|
catch (err) {
|
|
111
108
|
helpers_1.log.error(err);
|
|
112
109
|
yield transaction.rollback();
|
|
113
|
-
throw new golemio_errors_1.
|
|
110
|
+
throw new golemio_errors_1.GeneralError("Error while saving to database.", this.name, err);
|
|
114
111
|
}
|
|
115
112
|
}));
|
|
116
113
|
yield Promise.all(promises);
|
|
@@ -126,7 +123,7 @@ class TripsRepository extends models_2.PostgresModel {
|
|
|
126
123
|
yield this.validator.Validate(data);
|
|
127
124
|
}
|
|
128
125
|
catch (err) {
|
|
129
|
-
throw new golemio_errors_1.
|
|
126
|
+
throw new golemio_errors_1.GeneralError("Error while validating data.", this.name, err);
|
|
130
127
|
}
|
|
131
128
|
}
|
|
132
129
|
else {
|
|
@@ -155,7 +152,7 @@ class TripsRepository extends models_2.PostgresModel {
|
|
|
155
152
|
catch (err) {
|
|
156
153
|
helpers_1.log.error(err);
|
|
157
154
|
yield transaction.rollback();
|
|
158
|
-
throw new golemio_errors_1.
|
|
155
|
+
throw new golemio_errors_1.GeneralError("bulkUpsert: Error while saving to database.", this.name, err);
|
|
159
156
|
}
|
|
160
157
|
}));
|
|
161
158
|
const records = yield Promise.all(promises);
|
|
@@ -211,7 +208,7 @@ class TripsRepository extends models_2.PostgresModel {
|
|
|
211
208
|
catch (err) {
|
|
212
209
|
helpers_1.log.error(err);
|
|
213
210
|
yield transaction.rollback();
|
|
214
|
-
throw new golemio_errors_1.
|
|
211
|
+
throw new golemio_errors_1.GeneralError("bulkUpdate: Error while saving to database.", this.name, err);
|
|
215
212
|
}
|
|
216
213
|
}));
|
|
217
214
|
const records = yield Promise.all(promises);
|
|
@@ -311,7 +308,7 @@ class TripsRepository extends models_2.PostgresModel {
|
|
|
311
308
|
});
|
|
312
309
|
}
|
|
313
310
|
catch (err) {
|
|
314
|
-
throw new golemio_errors_1.
|
|
311
|
+
throw new golemio_errors_1.GeneralError("Error while purging old data", this.constructor.name, err);
|
|
315
312
|
}
|
|
316
313
|
});
|
|
317
314
|
this.deduceTimestamps = (min_stop_time, max_stop_time, origin_start_timestamp) => {
|
|
@@ -350,7 +347,7 @@ class TripsRepository extends models_2.PostgresModel {
|
|
|
350
347
|
return record.get({ plain: true });
|
|
351
348
|
}
|
|
352
349
|
catch (err) {
|
|
353
|
-
throw new golemio_errors_1.
|
|
350
|
+
throw new golemio_errors_1.GeneralError("upsertCommonRunTrip: Error while saving to database.", this.name, err);
|
|
354
351
|
}
|
|
355
352
|
});
|
|
356
353
|
this.upsertMetroRunTrip = (runInput, gtfsTrip) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -361,7 +358,7 @@ class TripsRepository extends models_2.PostgresModel {
|
|
|
361
358
|
return record.get({ plain: true });
|
|
362
359
|
}
|
|
363
360
|
catch (err) {
|
|
364
|
-
throw new golemio_errors_1.
|
|
361
|
+
throw new golemio_errors_1.GeneralError("upsertMetroRunTrip: Error while saving to database.", this.name, err);
|
|
365
362
|
}
|
|
366
363
|
});
|
|
367
364
|
/**
|
|
@@ -396,7 +393,7 @@ class TripsRepository extends models_2.PostgresModel {
|
|
|
396
393
|
catch (err) {
|
|
397
394
|
helpers_1.log.error(err);
|
|
398
395
|
yield transaction.rollback();
|
|
399
|
-
throw new golemio_errors_1.
|
|
396
|
+
throw new golemio_errors_1.GeneralError("Error while saving to database.", this.name, err);
|
|
400
397
|
}
|
|
401
398
|
}));
|
|
402
399
|
return Promise.all(promises);
|
|
@@ -476,20 +473,13 @@ class TripsRepository extends models_2.PostgresModel {
|
|
|
476
473
|
}
|
|
477
474
|
return results;
|
|
478
475
|
});
|
|
479
|
-
this.upsertNotPublic = (
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
vehicle_registration_number: input.run.registration_number,
|
|
487
|
-
vehicle_type_id: RouteTypeEnums_1.MPVRouteTypesEnum.TRAM,
|
|
488
|
-
wheelchair_accessible: input.run.wheelchair_accessible,
|
|
489
|
-
provider_source_type: ProviderSourceTypeEnum_1.ProviderSourceTypeEnum.Http,
|
|
490
|
-
id,
|
|
491
|
-
last_position_id: lastPositionId,
|
|
492
|
-
}, { returning: true });
|
|
476
|
+
this.upsertNotPublic = (tripDto) => __awaiter(this, void 0, void 0, function* () {
|
|
477
|
+
try {
|
|
478
|
+
yield this.sequelizeModel.upsert(tripDto);
|
|
479
|
+
}
|
|
480
|
+
catch (err) {
|
|
481
|
+
throw new golemio_errors_1.GeneralError("upsertNotPublic: error while saving data", this.name, err);
|
|
482
|
+
}
|
|
493
483
|
});
|
|
494
484
|
/**
|
|
495
485
|
* Return all valid trips for GTFS Realtime feed
|
|
@@ -553,7 +543,7 @@ class TripsRepository extends models_2.PostgresModel {
|
|
|
553
543
|
helpers_1.log.info(`refreshGtfsTripData: updated ${rowCount} trips`);
|
|
554
544
|
}
|
|
555
545
|
catch (err) {
|
|
556
|
-
throw new golemio_errors_1.
|
|
546
|
+
throw new golemio_errors_1.GeneralError("refreshGtfsTripData: error while updating data", this.name, err);
|
|
557
547
|
}
|
|
558
548
|
});
|
|
559
549
|
this.positionsRepository = new PositionsRepository_1.PositionsRepository();
|