@golemio/pid 3.4.0 → 3.4.1-dev.1622739356
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/jis/JisInfotextsController.js +4 -13
- package/dist/input-gateway/jis/JisInfotextsController.js.map +1 -1
- package/dist/input-gateway/jis/JisInfotextsRouter.js +3 -12
- package/dist/input-gateway/jis/JisInfotextsRouter.js.map +1 -1
- package/dist/input-gateway/ropid-gtfs/RopidGtfsController.js +4 -13
- package/dist/input-gateway/ropid-gtfs/RopidGtfsController.js.map +1 -1
- package/dist/input-gateway/ropid-gtfs/RopidGtfsRouter.js +3 -12
- package/dist/input-gateway/ropid-gtfs/RopidGtfsRouter.js.map +1 -1
- package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js +4 -13
- package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js.map +1 -1
- package/dist/input-gateway/vehicle-positions/VehiclePositionsRouter.js +3 -12
- package/dist/input-gateway/vehicle-positions/VehiclePositionsRouter.js.map +1 -1
- package/dist/integration-engine/data-retention/workers/tasks/DeleteDataTask.js +4 -15
- package/dist/integration-engine/data-retention/workers/tasks/DeleteDataTask.js.map +1 -1
- package/dist/integration-engine/data-retention/workers/tasks/TableStorageRetentionTask.js +8 -19
- package/dist/integration-engine/data-retention/workers/tasks/TableStorageRetentionTask.js.map +1 -1
- package/dist/integration-engine/jis/datasources/JISInfotextsDataSourceFactory.js +1 -1
- package/dist/integration-engine/jis/datasources/JISInfotextsDataSourceFactory.js.map +1 -1
- package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js +56 -72
- package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js.map +1 -1
- package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js +32 -48
- package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js.map +1 -1
- package/dist/integration-engine/jis/repositories/JISMetadataRepository.js +24 -37
- package/dist/integration-engine/jis/repositories/JISMetadataRepository.js.map +1 -1
- package/dist/integration-engine/jis/services/JISInfotextsDataService.js +24 -35
- package/dist/integration-engine/jis/services/JISInfotextsDataService.js.map +1 -1
- package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js +2 -3
- package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js.map +1 -1
- package/dist/integration-engine/jis/workers/tasks/FetchJISInfotextsTask.js +12 -23
- package/dist/integration-engine/jis/workers/tasks/FetchJISInfotextsTask.js.map +1 -1
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js +4 -15
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopTimesModel.js +3 -12
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopTimesModel.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js +2 -11
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGTFSTripsModel.js +3 -12
- package/dist/integration-engine/ropid-gtfs/RopidGTFSTripsModel.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGtfsFacade.js +21 -30
- package/dist/integration-engine/ropid-gtfs/RopidGtfsFacade.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGtfsMetadataRepository.js +20 -29
- package/dist/integration-engine/ropid-gtfs/RopidGtfsMetadataRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/RopidGtfsRepository.js +33 -52
- package/dist/integration-engine/ropid-gtfs/data-access/RopidGtfsRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/RouteSubAgencyRepository.js +12 -23
- package/dist/integration-engine/ropid-gtfs/data-access/RouteSubAgencyRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js +12 -23
- package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.js +33 -44
- package/dist/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.js +10 -21
- package/dist/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.js +15 -24
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/MinMaxStopSequencesRepository.js +3 -12
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/MinMaxStopSequencesRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/ServicesCalendarRepository.js +3 -12
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/ServicesCalendarRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripScheduleRepository.js +4 -13
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripScheduleRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.js +30 -41
- package/dist/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/helpers/DataCacheManager.js +11 -22
- package/dist/integration-engine/ropid-gtfs/helpers/DataCacheManager.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.js +1 -2
- package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSCisStopsTransformation.js +7 -16
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSCisStopsTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSOisTransformation.js +3 -12
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSOisTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.js +13 -17
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/data-access/PresetLogRepository.js +13 -22
- package/dist/integration-engine/ropid-gtfs/workers/presets/data-access/PresetLogRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/datasources/grafana-loki/GrafanaLokiDataSourceProvider.js +1 -2
- package/dist/integration-engine/ropid-gtfs/workers/presets/datasources/grafana-loki/GrafanaLokiDataSourceProvider.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/helpers/RopidMonitoringService.js +12 -23
- package/dist/integration-engine/ropid-gtfs/workers/presets/helpers/RopidMonitoringService.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CheckForNewDeparturesPresetsTask.js +14 -25
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CheckForNewDeparturesPresetsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CollectAndSaveLogsTask.js +26 -37
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CollectAndSaveLogsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/DownloadDeparturesPresetsTask.js +12 -23
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/DownloadDeparturesPresetsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/ProcessAndSendLogsTask.js +36 -49
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/ProcessAndSendLogsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/SavePresetsDataTask.js +3 -14
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/SavePresetsDataTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/transformations/PresetLogTransformation.js +1 -2
- package/dist/integration-engine/ropid-gtfs/workers/presets/transformations/PresetLogTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.js +29 -40
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js +64 -81
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/DownloadDatasetsTask.js +60 -79
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/DownloadDatasetsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPrecomputedTablesTask.js +23 -34
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPrecomputedTablesTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPublicGtfsDepartureCacheTask.js +26 -38
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPublicGtfsDepartureCacheTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/SaveStaticDataTask.js +21 -32
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/SaveStaticDataTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/TransformAndSaveDataTask.js +43 -55
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/TransformAndSaveDataTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/DeparturesDirectionRepository.js +8 -18
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/DeparturesDirectionRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/MetroRailtrackGPSRepository.js +11 -21
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/MetroRailtrackGPSRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.js +8 -17
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.js +19 -30
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/transformations/DeparturesDirectionTransformation.js +8 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/transformations/DeparturesDirectionTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.js +31 -47
- package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsRoutesModel.js +6 -17
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsRoutesModel.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIMetadataModel.js +4 -14
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIMetadataModel.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/workers/tasks/CheckForNewEventsTask.js +6 -17
- package/dist/integration-engine/ropid-vymi/workers/tasks/CheckForNewEventsTask.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/workers/tasks/FetchAndProcessEventsTask.js +34 -31
- package/dist/integration-engine/ropid-vymi/workers/tasks/FetchAndProcessEventsTask.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.js +3 -12
- package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.js.map +1 -1
- package/dist/integration-engine/shared/RopidMetadataModel.js +35 -45
- package/dist/integration-engine/shared/RopidMetadataModel.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertsGenerator.js +13 -24
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertsGenerator.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/VehicleDescriptor.js +9 -6
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/VehicleDescriptor.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.js +113 -128
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.js +20 -34
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/AbstractRunRepository.js +3 -12
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/AbstractRunRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsMessagesRepository.js +3 -12
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsMessagesRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsRepository.js +12 -21
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/CommonMessageProcessor.js +7 -16
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/CommonMessageProcessor.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/CisLookupManager.js +22 -33
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/CisLookupManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/GtfsLookupManager.js +31 -44
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/GtfsLookupManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusRunsFacade.js +14 -25
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusRunsFacade.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/TripScheduleManager.js +25 -37
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/TripScheduleManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessMetroRunMessagesTask.js +53 -63
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessMetroRunMessagesTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessRegionalBusRunMessagesTask.js +57 -72
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessRegionalBusRunMessagesTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveArrivaCityRunsToDBTask.js +15 -26
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveArrivaCityRunsToDBTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveBusRunsToDBTask.js +10 -21
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveBusRunsToDBTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveMetroRunsToDBTask.js +19 -30
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveMetroRunsToDBTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveTramRunsToDBTask.js +10 -21
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveTramRunsToDBTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/CommonRunsMessagesTransformation.js +5 -14
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/CommonRunsMessagesTransformation.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessageProcessingTransformation.js +4 -14
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessageProcessingTransformation.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/RegionalBusRunsMessagesTransformation.js +1 -2
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/RegionalBusRunsMessagesTransformation.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/data-access/DescriptorRepository.js +35 -49
- 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/tasks/RefreshDescriptorsTask.js +11 -22
- package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/tasks/RefreshDescriptorsTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.js +2 -3
- 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/CisStopRepository.js +3 -12
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/CisStopRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsHistoryRepository.js +3 -12
- 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.js +19 -29
- 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/StopTimesHistoryRepository.js +3 -12
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/StopTimesHistoryRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsHistoryRepository.js +3 -12
- 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.js +58 -55
- 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/cache/PublicApiCacheRepository.js +64 -79
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicApiCacheRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicStopTimeCacheRepository.js +46 -59
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicStopTimeCacheRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsMapper.js +39 -6
- 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/data-access/metro/CachedMetroRailtrackLookup.js +8 -19
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/metro/CachedMetroRailtrackLookup.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/PublicStopTimeRepository.js +2 -13
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/PublicStopTimeRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DPPUtils.js +1 -2
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DPPUtils.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DelayComputationManager.js +10 -16
- 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/PositionsManager.js +68 -40
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/TripStopsManager.js +5 -14
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/TripStopsManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/VPUtils.js +1 -2
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/VPUtils.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/anchor-points/AnchorPointSegmenter.js +1 -2
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/anchor-points/AnchorPointSegmenter.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/ComputeDelayHelper.js +4 -4
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/ComputeDelayHelper.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/AbstractDelayAtStop.js +1 -2
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/AbstractDelayAtStop.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/CommonDelayAtStop.js +4 -5
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/CommonDelayAtStop.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/MetroDelayAtStop.js +3 -4
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/MetroDelayAtStop.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-data/strategy/HttpGtfsTripDataFixer.js +7 -18
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-data/strategy/HttpGtfsTripDataFixer.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/AbstractGTFSTripRunManager.js +7 -16
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/AbstractGTFSTripRunManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripCommonRunManager.js +40 -57
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripCommonRunManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripMetroRunManager.js +36 -53
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripMetroRunManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/metro/MetroShapePointsFixer.js +32 -41
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/metro/MetroShapePointsFixer.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js +61 -33
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/RegionalBusComputeDelayHelper.js +4 -4
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/RegionalBusComputeDelayHelper.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/strategy/BusDelayAtStop.js +4 -6
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/strategy/BusDelayAtStop.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/gtfs-trip-run/GtfsTripRegionalBusRunManager.js +38 -55
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/gtfs-trip-run/GtfsTripRegionalBusRunManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/DataRetentionTask.js +32 -45
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/DataRetentionTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/ProcessRegionalBusPositionsTask.js +81 -91
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/ProcessRegionalBusPositionsTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateDelayTask.js +43 -55
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateDelayTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js +37 -49
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshGtfsTripDataTask.js +7 -18
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshGtfsTripDataTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js +41 -52
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicTripCacheTask.js +32 -43
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicTripCacheTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.js +95 -115
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateDelayTask.js +150 -162
- 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 +82 -94
- 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 +24 -35
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateRunsGtfsTripIdTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/abstract/AbstractPropagateDelayTask.js +15 -18
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/abstract/AbstractPropagateDelayTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/helpers/UpdateDelayLimiter.js +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/helpers/UpdateDelayLimiter.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js +11 -21
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js +2 -3
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js.map +1 -1
- package/dist/output-gateway/pid/controllers/v2/V2DepartureBoardsController.js +5 -15
- package/dist/output-gateway/pid/controllers/v2/V2DepartureBoardsController.js.map +1 -1
- package/dist/output-gateway/pid/controllers/v2/V2InfotextsController.js +4 -13
- package/dist/output-gateway/pid/controllers/v2/V2InfotextsController.js.map +1 -1
- package/dist/output-gateway/pid/controllers/v3/V3InfotextsController.js +4 -13
- package/dist/output-gateway/pid/controllers/v3/V3InfotextsController.js.map +1 -1
- package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js +8 -17
- package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js.map +1 -1
- package/dist/output-gateway/pid/data-access/DeparturesRepository.js +40 -53
- package/dist/output-gateway/pid/data-access/DeparturesRepository.js.map +1 -1
- package/dist/output-gateway/pid/data-access/JISInfotextRepository.js +62 -75
- package/dist/output-gateway/pid/data-access/JISInfotextRepository.js.map +1 -1
- package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js +2 -3
- package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js.map +1 -1
- package/dist/output-gateway/pid/helpers/ParamValidatorManager.js +6 -15
- package/dist/output-gateway/pid/helpers/ParamValidatorManager.js.map +1 -1
- package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js +11 -21
- package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js.map +1 -1
- package/dist/output-gateway/pid/models/RopidDeparturesDirectionsModel.js +20 -27
- package/dist/output-gateway/pid/models/RopidDeparturesDirectionsModel.js.map +1 -1
- package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.js +16 -25
- package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.js.map +1 -1
- package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js +2 -4
- package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js.map +1 -1
- package/dist/output-gateway/pid/service/facade/InfotextFacade.js +12 -23
- package/dist/output-gateway/pid/service/facade/InfotextFacade.js.map +1 -1
- package/dist/output-gateway/pid/service/facade/StopFacade.js +27 -38
- package/dist/output-gateway/pid/service/facade/StopFacade.js.map +1 -1
- package/dist/output-gateway/pid/service/facade/TransferFacade.js +32 -39
- package/dist/output-gateway/pid/service/facade/TransferFacade.js.map +1 -1
- package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.js +3 -4
- package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.js.map +1 -1
- package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.js +8 -12
- package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.js.map +1 -1
- package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.js +1 -2
- package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.js.map +1 -1
- package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.js +1 -2
- package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.js.map +1 -1
- package/dist/output-gateway/public/controllers/v2/V2PublicDepartureBoardsController.js +4 -13
- package/dist/output-gateway/public/controllers/v2/V2PublicDepartureBoardsController.js.map +1 -1
- package/dist/output-gateway/public/controllers/v2/V2PublicGtfsController.js +4 -13
- package/dist/output-gateway/public/controllers/v2/V2PublicGtfsController.js.map +1 -1
- package/dist/output-gateway/public/controllers/v2/V2PublicVehiclePositionsController.js +9 -18
- package/dist/output-gateway/public/controllers/v2/V2PublicVehiclePositionsController.js.map +1 -1
- package/dist/output-gateway/public/data-access/VehicleDescriptorCachedRepository.js +13 -26
- package/dist/output-gateway/public/data-access/VehicleDescriptorCachedRepository.js.map +1 -1
- package/dist/output-gateway/public/data-access/redis/DelayComputationRepository.js +22 -33
- package/dist/output-gateway/public/data-access/redis/DelayComputationRepository.js.map +1 -1
- package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js +9 -20
- package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js.map +1 -1
- package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.js +23 -34
- package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.js.map +1 -1
- package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js +153 -172
- package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js.map +1 -1
- package/dist/output-gateway/public/routers/v2/helpers/CustomStopIdGroupValidator.js +2 -2
- package/dist/output-gateway/public/routers/v2/helpers/CustomStopIdGroupValidator.js.map +1 -1
- package/dist/output-gateway/public/service/VPSubscriber.js +8 -19
- package/dist/output-gateway/public/service/VPSubscriber.js.map +1 -1
- package/dist/output-gateway/public/service/facade/DepartureBoardFacade.js +100 -117
- package/dist/output-gateway/public/service/facade/DepartureBoardFacade.js.map +1 -1
- package/dist/output-gateway/public/service/facade/DetailedTripFacade.js +18 -29
- package/dist/output-gateway/public/service/facade/DetailedTripFacade.js.map +1 -1
- package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.js +20 -31
- package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.js.map +1 -1
- package/dist/output-gateway/public/service/facade/VehiclePositionsFacade.js +15 -26
- package/dist/output-gateway/public/service/facade/VehiclePositionsFacade.js.map +1 -1
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.js +1 -2
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.js.map +1 -1
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.js +3 -14
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.js.map +1 -1
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.js +7 -18
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.js.map +1 -1
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.js +35 -46
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.js.map +1 -1
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.js +16 -22
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.js.map +1 -1
- package/dist/output-gateway/public/service/transformations/PublicDepartureTransformation.js +9 -10
- package/dist/output-gateway/public/service/transformations/PublicDepartureTransformation.js.map +1 -1
- package/dist/output-gateway/public/service/transformations/PublicVehiclePositionsTransformation.js +5 -15
- package/dist/output-gateway/public/service/transformations/PublicVehiclePositionsTransformation.js.map +1 -1
- package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.js +2 -3
- package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.js.map +1 -1
- package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripInfoTransformation.js +2 -15
- package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripInfoTransformation.js.map +1 -1
- package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripStopTimesTransformation.js +1 -13
- package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripStopTimesTransformation.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.js +14 -25
- package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSCalendarModel.js +3 -12
- package/dist/output-gateway/ropid-gtfs/models/GTFSCalendarModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSRoutesModel.js +4 -13
- package/dist/output-gateway/ropid-gtfs/models/GTFSRoutesModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSShapesModel.js +5 -14
- package/dist/output-gateway/ropid-gtfs/models/GTFSShapesModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js +90 -102
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopTimesModel.js +3 -12
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopTimesModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.js +43 -51
- package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/routers/v2/V2GTFSRouter.js +28 -37
- package/dist/output-gateway/ropid-gtfs/routers/v2/V2GTFSRouter.js.map +1 -1
- package/dist/output-gateway/shared/DepartureCalculator.js +1 -1
- package/dist/output-gateway/shared/DepartureCalculator.js.map +1 -1
- package/dist/output-gateway/vehicle-positions/data-access/helpers/PositionOutputMapper.js +40 -48
- package/dist/output-gateway/vehicle-positions/data-access/helpers/PositionOutputMapper.js.map +1 -1
- package/dist/output-gateway/vehicle-positions/data-access/views/TripWithLastPositionRepository.js +7 -16
- package/dist/output-gateway/vehicle-positions/data-access/views/TripWithLastPositionRepository.js.map +1 -1
- package/dist/output-gateway/vehicle-positions/routers/v2/V2VehiclePositionsRouter.js +10 -19
- package/dist/output-gateway/vehicle-positions/routers/v2/V2VehiclePositionsRouter.js.map +1 -1
- package/dist/schema-definitions/ropid-gtfs/RopidGTFSRunNumbers.js +5 -2
- package/dist/schema-definitions/ropid-gtfs/RopidGTFSRunNumbers.js.map +1 -1
- package/dist/schema-definitions/ropid-gtfs/index.js +16 -4
- package/dist/schema-definitions/ropid-gtfs/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -11,15 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
13
|
};
|
|
14
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
15
|
exports.JISInfotextsRopidGTFSStopsRepository = void 0;
|
|
25
16
|
const const_1 = require("../../../schema-definitions/const");
|
|
@@ -48,20 +39,18 @@ let JISInfotextsRopidGTFSStopsRepository = exports.JISInfotextsRopidGTFSStopsRep
|
|
|
48
39
|
* @param options Options for the operation
|
|
49
40
|
* @returns The number of deleted items
|
|
50
41
|
*/
|
|
51
|
-
deleteAllLastUpdatedBefore(dateTime, options) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
});
|
|
42
|
+
async deleteAllLastUpdatedBefore(dateTime, options) {
|
|
43
|
+
try {
|
|
44
|
+
return await this.sequelizeModel.destroy({
|
|
45
|
+
where: {
|
|
46
|
+
updated_at: { [sequelize_1.Op.lt]: dateTime },
|
|
47
|
+
},
|
|
48
|
+
transaction: options?.transaction,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
catch (err) {
|
|
52
|
+
throw new golemio_errors_1.GeneralError("Error in deleteAllLastUpdatedBefore", this.constructor.name, err);
|
|
53
|
+
}
|
|
65
54
|
}
|
|
66
55
|
/**
|
|
67
56
|
* Insert or update all given data. In case of an update, all attributes except for `created_at` shall be overwritten.
|
|
@@ -70,23 +59,20 @@ let JISInfotextsRopidGTFSStopsRepository = exports.JISInfotextsRopidGTFSStopsRep
|
|
|
70
59
|
* @param options Options for the operation
|
|
71
60
|
* @returns The upserted items
|
|
72
61
|
*/
|
|
73
|
-
upsertAll(data, options) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
62
|
+
async upsertAll(data, options) {
|
|
63
|
+
try {
|
|
64
|
+
return await this.sequelizeModel.bulkCreate(data, {
|
|
65
|
+
updateOnDuplicate: this.getUpdateAttributes(),
|
|
66
|
+
transaction: options?.transaction,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
catch (err) {
|
|
70
|
+
if (err instanceof sequelize_1.ValidationError && err.errors?.length > 0) {
|
|
71
|
+
const mappedErrors = err.errors.map((e) => `${e.message} (${e.value})`).join(", ");
|
|
72
|
+
throw new golemio_errors_1.ValidationError(`Validation error in upsertAll: ${mappedErrors}`, this.constructor.name, err, undefined, "pid");
|
|
81
73
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
const mappedErrors = err.errors.map((e) => `${e.message} (${e.value})`).join(", ");
|
|
85
|
-
throw new golemio_errors_1.ValidationError(`Validation error in upsertAll: ${mappedErrors}`, this.constructor.name, err, undefined, "pid");
|
|
86
|
-
}
|
|
87
|
-
throw new golemio_errors_1.GeneralError("Error in upsertAll", this.constructor.name, err);
|
|
88
|
-
}
|
|
89
|
-
});
|
|
74
|
+
throw new golemio_errors_1.GeneralError("Error in upsertAll", this.constructor.name, err);
|
|
75
|
+
}
|
|
90
76
|
}
|
|
91
77
|
getUpdateAttributes() {
|
|
92
78
|
return Object.keys(JISInfotextsRopidGTFSStopsModel_1.JISInfotextsRopidGTFSStopsModel.attributeModel).filter((attribute) => !["created_at"].includes(attribute));
|
|
@@ -95,15 +81,13 @@ let JISInfotextsRopidGTFSStopsRepository = exports.JISInfotextsRopidGTFSStopsRep
|
|
|
95
81
|
* @param options
|
|
96
82
|
* @returns The number of deleted items
|
|
97
83
|
*/
|
|
98
|
-
deleteAll(options) {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
});
|
|
84
|
+
async deleteAll(options) {
|
|
85
|
+
try {
|
|
86
|
+
return await this.sequelizeModel.destroy({ where: {}, transaction: options?.transaction });
|
|
87
|
+
}
|
|
88
|
+
catch (err) {
|
|
89
|
+
throw new golemio_errors_1.GeneralError("Error in deleteAll", this.constructor.name, err);
|
|
90
|
+
}
|
|
107
91
|
}
|
|
108
92
|
};
|
|
109
93
|
exports.JISInfotextsRopidGTFSStopsRepository = JISInfotextsRopidGTFSStopsRepository = __decorate([
|
package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JISInfotextsRopidGTFSStopsRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"JISInfotextsRopidGTFSStopsRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.ts"],"names":[],"mappings":"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"}
|
|
@@ -8,15 +8,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
11
|
var JISMetadataRepository_1;
|
|
21
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
13
|
exports.JISMetadataRepository = void 0;
|
|
@@ -37,40 +28,36 @@ let JISMetadataRepository = exports.JISMetadataRepository = JISMetadataRepositor
|
|
|
37
28
|
this.key = "main";
|
|
38
29
|
}
|
|
39
30
|
/** Get the Etag of the last JIS Infotexts response */
|
|
40
|
-
getLastInfotextsEtag() {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
});
|
|
31
|
+
async getLastInfotextsEtag() {
|
|
32
|
+
try {
|
|
33
|
+
const metadata = await this.get(this.key);
|
|
34
|
+
return metadata?.infotexts.lastResponse.etag;
|
|
35
|
+
}
|
|
36
|
+
catch (err) {
|
|
37
|
+
if (err instanceof golemio_errors_1.GeneralError)
|
|
38
|
+
throw err;
|
|
39
|
+
throw new golemio_errors_1.GeneralError("Error while getting last infotexts etag", this.constructor.name, err);
|
|
40
|
+
}
|
|
52
41
|
}
|
|
53
42
|
/**
|
|
54
43
|
* Set the Etag of the last JIS Infotexts response to a given new value
|
|
55
44
|
*
|
|
56
45
|
* @param etag The new Etag of the last JIS Infotexts response
|
|
57
46
|
*/
|
|
58
|
-
setLastInfotextsEtag(etag) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
});
|
|
47
|
+
async setLastInfotextsEtag(etag) {
|
|
48
|
+
try {
|
|
49
|
+
let metadata = await this.get(this.key);
|
|
50
|
+
if (!metadata)
|
|
51
|
+
metadata = this.initializeMetadata();
|
|
52
|
+
metadata.infotexts.lastResponse.etag = etag;
|
|
53
|
+
metadata.infotexts.lastResponse.updatedAt = new Date().toISOString();
|
|
54
|
+
await this.set(this.key, metadata);
|
|
55
|
+
}
|
|
56
|
+
catch (err) {
|
|
57
|
+
if (err instanceof golemio_errors_1.GeneralError)
|
|
58
|
+
throw err;
|
|
59
|
+
throw new golemio_errors_1.GeneralError("Error while updating last infotexts etag", this.constructor.name, err);
|
|
60
|
+
}
|
|
74
61
|
}
|
|
75
62
|
initializeMetadata() {
|
|
76
63
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JISMetadataRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/repositories/JISMetadataRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"JISMetadataRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/repositories/JISMetadataRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,uEAAqE;AAErE,6GAAmF;AACnF,wFAAqF;AACrF,6EAAwE;AACxE,mFAAkF;AAClF,iEAAgE;AAGzD,IAAM,qBAAqB,6DAA3B,MAAM,qBAAsB,SAAQ,uBAAU;IAKjD;QACI,KAAK,CACD,uBAAuB,EACvB;YACI,kBAAkB,EAAE,IAAI,CAAC,KAAK;YAC9B,oBAAoB,EAAE,IAAI,CAAC,SAAS;YACpC,wBAAwB,EAAE,KAAK;YAC/B,MAAM,EAAE,uBAAqB,CAAC,gBAAgB;SACjD,EACD,IAAI,uCAAmB,CAAC,gCAAgC,EAAE,2CAAoB,CAAC,CAClF,CAAC;QAZa,QAAG,GAAG,MAAM,CAAC;IAahC,CAAC;IAED,sDAAsD;IACtD,KAAK,CAAC,oBAAoB;QACtB,IAAI;YACA,MAAM,QAAQ,GAAgC,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACvE,OAAO,QAAQ,EAAE,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC;SAChD;QAAC,OAAO,GAAG,EAAE;YACV,IAAI,GAAG,YAAY,6BAAY;gBAAE,MAAM,GAAG,CAAC;YAC3C,MAAM,IAAI,6BAAY,CAAC,yCAAyC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SACjG;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,oBAAoB,CAAC,IAAY;QACnC,IAAI;YACA,IAAI,QAAQ,GAAgC,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACrE,IAAI,CAAC,QAAQ;gBAAE,QAAQ,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC;YACpD,QAAQ,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,GAAG,IAAI,CAAC;YAC5C,QAAQ,CAAC,SAAS,CAAC,YAAY,CAAC,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;YACrE,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;SACtC;QAAC,OAAO,GAAG,EAAE;YACV,IAAI,GAAG,YAAY,6BAAY;gBAAE,MAAM,GAAG,CAAC;YAC3C,MAAM,IAAI,6BAAY,CAAC,0CAA0C,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SAClG;IACL,CAAC;IAEO,kBAAkB;QACtB,OAAO;YACH,SAAS,EAAE;gBACP,YAAY,EAAE;oBACV,IAAI,EAAE,EAAE;oBACR,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;iBACtC;aACJ;SACJ,CAAC;IACN,CAAC;;AAvDsB,sCAAgB,GAAG,qCAA6B,AAAhC,CAAiC;gCAD/D,qBAAqB;IADjC,IAAA,qBAAU,GAAE;;GACA,qBAAqB,CAyDjC"}
|
|
@@ -11,15 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
13
|
};
|
|
14
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
15
|
exports.JISInfotextsDataService = void 0;
|
|
25
16
|
const JISContainerToken_1 = require("../ioc/JISContainerToken");
|
|
@@ -43,34 +34,32 @@ let JISInfotextsDataService = exports.JISInfotextsDataService = class JISInfotex
|
|
|
43
34
|
* @param infotexts The infotexts data to be upserted
|
|
44
35
|
* @param infotextsRopidGTFSStops The infotextsRopidGTFSStops data to be upserted
|
|
45
36
|
*/
|
|
46
|
-
refreshData(infotexts, infotextsRopidGTFSStops) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
this.logger.info(`${this.constructor.name}.refreshData: all JIS infotexts were deleted because 0 infotexts were imported`);
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
yield this.infotextsRepository.refreshData(infotexts, { transaction });
|
|
60
|
-
yield this.infotextsRopidGTFSStopsRepository.upsertAll(infotextsRopidGTFSStops, { transaction });
|
|
61
|
-
yield this.infotextsRopidGTFSStopsRepository.deleteAllLastUpdatedBefore(saveTime, { transaction });
|
|
62
|
-
yield transaction.commit();
|
|
63
|
-
this.logger.info(`${this.constructor.name}.refreshData: ${infotexts.length} JIS infotexts and ` +
|
|
64
|
-
`${infotextsRopidGTFSStops.length} JIS infotextsRopidGTFSStops were saved`);
|
|
65
|
-
}
|
|
37
|
+
async refreshData(infotexts, infotextsRopidGTFSStops) {
|
|
38
|
+
const connection = this.databaseConnector.getConnection();
|
|
39
|
+
const transaction = await connection.transaction();
|
|
40
|
+
const saveTime = new Date();
|
|
41
|
+
try {
|
|
42
|
+
if (infotexts.length === 0) {
|
|
43
|
+
await this.infotextsRopidGTFSStopsRepository.deleteAll({ transaction });
|
|
44
|
+
await this.infotextsRepository.deleteAll({ transaction });
|
|
45
|
+
await transaction.commit();
|
|
46
|
+
this.logger.info(`${this.constructor.name}.refreshData: all JIS infotexts were deleted because 0 infotexts were imported`);
|
|
66
47
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
48
|
+
else {
|
|
49
|
+
await this.infotextsRepository.refreshData(infotexts, { transaction });
|
|
50
|
+
await this.infotextsRopidGTFSStopsRepository.upsertAll(infotextsRopidGTFSStops, { transaction });
|
|
51
|
+
await this.infotextsRopidGTFSStopsRepository.deleteAllLastUpdatedBefore(saveTime, { transaction });
|
|
52
|
+
await transaction.commit();
|
|
53
|
+
this.logger.info(`${this.constructor.name}.refreshData: ${infotexts.length} JIS infotexts and ` +
|
|
54
|
+
`${infotextsRopidGTFSStops.length} JIS infotextsRopidGTFSStops were saved`);
|
|
72
55
|
}
|
|
73
|
-
}
|
|
56
|
+
}
|
|
57
|
+
catch (err) {
|
|
58
|
+
await transaction.rollback();
|
|
59
|
+
if (err instanceof golemio_errors_1.GeneralError)
|
|
60
|
+
throw err;
|
|
61
|
+
throw new golemio_errors_1.GeneralError("Refreshing JIS Infotexts in database failed", this.constructor.name, err);
|
|
62
|
+
}
|
|
74
63
|
}
|
|
75
64
|
};
|
|
76
65
|
exports.JISInfotextsDataService = JISInfotextsDataService = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JISInfotextsDataService.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/services/JISInfotextsDataService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"JISInfotextsDataService.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/services/JISInfotextsDataService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAAkE;AAClE,mFAAqF;AACrF,+GAAiH;AAIjH,wEAAqE;AACrE,6EAAwE;AACxE,iEAAwE;AAGjE,IAAM,uBAAuB,qCAA7B,MAAM,uBAAuB;IAChC,YAEY,mBAA2C,EAE3C,iCAAuE,EAClC,iBAAqC,EAChD,MAAe;QAJzC,wBAAmB,GAAnB,mBAAmB,CAAwB;QAE3C,sCAAiC,GAAjC,iCAAiC,CAAsC;QAClC,sBAAiB,GAAjB,iBAAiB,CAAoB;QAChD,WAAM,GAAN,MAAM,CAAS;QAEjD,aAAa;IACjB,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,WAAW,CAAC,SAAyB,EAAE,uBAAsD;QACtG,MAAM,UAAU,GAAG,IAAI,CAAC,iBAAiB,CAAC,aAAa,EAAE,CAAC;QAC1D,MAAM,WAAW,GAAG,MAAM,UAAU,CAAC,WAAW,EAAE,CAAC;QACnD,MAAM,QAAQ,GAAG,IAAI,IAAI,EAAE,CAAC;QAE5B,IAAI;YACA,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;gBACxB,MAAM,IAAI,CAAC,iCAAiC,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;gBACxE,MAAM,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;gBAC1D,MAAM,WAAW,CAAC,MAAM,EAAE,CAAC;gBAC3B,IAAI,CAAC,MAAM,CAAC,IAAI,CACZ,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,gFAAgF,CAC3G,CAAC;aACL;iBAAM;gBACH,MAAM,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,SAAS,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;gBACvE,MAAM,IAAI,CAAC,iCAAiC,CAAC,SAAS,CAAC,uBAAuB,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;gBACjG,MAAM,IAAI,CAAC,iCAAiC,CAAC,0BAA0B,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;gBACnG,MAAM,WAAW,CAAC,MAAM,EAAE,CAAC;gBAC3B,IAAI,CAAC,MAAM,CAAC,IAAI,CACZ,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,iBAAiB,SAAS,CAAC,MAAM,qBAAqB;oBAC1E,GAAG,uBAAuB,CAAC,MAAM,yCAAyC,CACjF,CAAC;aACL;SACJ;QAAC,OAAO,GAAG,EAAE;YACV,MAAM,WAAW,CAAC,QAAQ,EAAE,CAAC;YAC7B,IAAI,GAAG,YAAY,6BAAY;gBAAE,MAAM,GAAG,CAAC;YAC3C,MAAM,IAAI,6BAAY,CAAC,6CAA6C,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SACrG;IACL,CAAC;CACJ,CAAA;kCAhDY,uBAAuB;IADnC,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,qCAAiB,CAAC,sBAAsB,CAAC,CAAA;IAEhD,WAAA,IAAA,iBAAM,EAAC,qCAAiB,CAAC,oCAAoC,CAAC,CAAA;IAE9D,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;IACnC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;qCAJI,+CAAsB;QAER,2EAAoC;GAL1E,uBAAuB,CAgDnC"}
|
|
@@ -14,7 +14,6 @@ let JISInfotextsTransformation = exports.JISInfotextsTransformation = class JISI
|
|
|
14
14
|
super(...arguments);
|
|
15
15
|
this.name = "JISInfotextsTransformation";
|
|
16
16
|
this.transformInternal = (data) => {
|
|
17
|
-
var _a, _b, _c;
|
|
18
17
|
const infotext = {
|
|
19
18
|
id: data.id,
|
|
20
19
|
severity_level: data.severity_level,
|
|
@@ -25,10 +24,10 @@ let JISInfotextsTransformation = exports.JISInfotextsTransformation = class JISI
|
|
|
25
24
|
created_timestamp: new Date(data.created_timestamp),
|
|
26
25
|
updated_timestamp: new Date(data.last_modified_timestamp),
|
|
27
26
|
};
|
|
28
|
-
const infotextsRopidGTFSStops =
|
|
27
|
+
const infotextsRopidGTFSStops = data.informed_entity?.stops?.map(({ stop_id }) => ({
|
|
29
28
|
infotext_id: data.id,
|
|
30
29
|
stop_id,
|
|
31
|
-
}))
|
|
30
|
+
})) ?? [];
|
|
32
31
|
return {
|
|
33
32
|
infotext,
|
|
34
33
|
infotextsRopidGTFSStops,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JISInfotextsTransformation.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/transformations/JISInfotextsTransformation.ts"],"names":[],"mappings":";;;;;;;;;AAKA,6GAA0G;AAC1G,iEAAgE;AASzD,IAAM,0BAA0B,wCAAhC,MAAM,0BAA2B,SAAQ,+CAAiD;IAA1F;;QACI,SAAI,GAAG,4BAA4B,CAAC;QAEjC,sBAAiB,GAAG,CAAC,IAAiB,EAAgB,EAAE
|
|
1
|
+
{"version":3,"file":"JISInfotextsTransformation.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/transformations/JISInfotextsTransformation.ts"],"names":[],"mappings":";;;;;;;;;AAKA,6GAA0G;AAC1G,iEAAgE;AASzD,IAAM,0BAA0B,wCAAhC,MAAM,0BAA2B,SAAQ,+CAAiD;IAA1F;;QACI,SAAI,GAAG,4BAA4B,CAAC;QAEjC,sBAAiB,GAAG,CAAC,IAAiB,EAAgB,EAAE;YAC9D,MAAM,QAAQ,GAAG;gBACb,EAAE,EAAE,IAAI,CAAC,EAAE;gBACX,cAAc,EAAE,IAAI,CAAC,cAAc;gBACnC,YAAY,EAAE,IAAI,CAAC,YAAY;gBAC/B,mBAAmB,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;gBACvD,iBAAiB,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI;gBACnF,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;gBACvC,iBAAiB,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC;gBACnD,iBAAiB,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAC;aAC5D,CAAC;YACF,MAAM,uBAAuB,GACzB,IAAI,CAAC,eAAe,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;gBAC/C,WAAW,EAAE,IAAI,CAAC,EAAE;gBACpB,OAAO;aACV,CAAC,CAAC,IAAI,EAAE,CAAC;YACd,OAAO;gBACH,QAAQ;gBACR,uBAAuB;aAC1B,CAAC;QACN,CAAC,CAAC;IACN,CAAC;CAAA,CAAA;qCAxBY,0BAA0B;IADtC,IAAA,qBAAU,GAAE;GACA,0BAA0B,CAwBtC"}
|
|
@@ -11,15 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
13
|
};
|
|
14
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
15
|
exports.FetchJISInfotextsTask = void 0;
|
|
25
16
|
const JISInfotextsDataSourceFactory_1 = require("../../datasources/JISInfotextsDataSourceFactory");
|
|
@@ -36,22 +27,20 @@ let FetchJISInfotextsTask = exports.FetchJISInfotextsTask = class FetchJISInfote
|
|
|
36
27
|
this.queueTtl = 20 * 1000; // 20 seconds
|
|
37
28
|
}
|
|
38
29
|
/** Fetch JIS Infotexts data source */
|
|
39
|
-
execute() {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
30
|
+
async execute() {
|
|
31
|
+
try {
|
|
32
|
+
const dataSource = this.dataSourceFactory.getDataSource();
|
|
33
|
+
const data = await dataSource.getAll();
|
|
34
|
+
await integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "refreshJISInfotexts", data);
|
|
35
|
+
}
|
|
36
|
+
catch (err) {
|
|
37
|
+
if (err instanceof golemio_errors_1.AbstractGolemioError) {
|
|
38
|
+
throw err;
|
|
45
39
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
throw err;
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
throw new golemio_errors_1.GeneralError("Error while fetching new JIS infotexts", this.constructor.name, err);
|
|
52
|
-
}
|
|
40
|
+
else {
|
|
41
|
+
throw new golemio_errors_1.GeneralError("Error while fetching new JIS infotexts", this.constructor.name, err);
|
|
53
42
|
}
|
|
54
|
-
}
|
|
43
|
+
}
|
|
55
44
|
}
|
|
56
45
|
};
|
|
57
46
|
exports.FetchJISInfotextsTask = FetchJISInfotextsTask = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FetchJISInfotextsTask.js","sourceRoot":"","sources":["../../../../../src/integration-engine/jis/workers/tasks/FetchJISInfotextsTask.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FetchJISInfotextsTask.js","sourceRoot":"","sources":["../../../../../src/integration-engine/jis/workers/tasks/FetchJISInfotextsTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mGAAkG;AAClG,mEAAkE;AAClE,8EAAwF;AACxF,iEAAwE;AACxE,4CAA+C;AAC/C,6EAA8F;AAGvF,IAAM,qBAAqB,mCAA3B,MAAM,qBAAsB,SAAQ,sCAAiB;IAIxD,YAEI,iBAAwD;QAExD,KAAK,CAAC,2BAAe,CAAC,WAAW,EAAE,CAAC,CAAC;QAF7B,sBAAiB,GAAjB,iBAAiB,CAA+B;QAL5C,cAAS,GAAG,mBAAmB,CAAC;QAChC,aAAQ,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,aAAa;IAOnD,CAAC;IAED,sCAAsC;IAC5B,KAAK,CAAC,OAAO;QACnB,IAAI;YACA,MAAM,UAAU,GAAG,IAAI,CAAC,iBAAiB,CAAC,aAAa,EAAE,CAAC;YAC1D,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,MAAM,EAAE,CAAC;YAEvC,MAAM,iCAAY,CAAC,qBAAqB,CAAC,IAAI,CAAC,WAAW,EAAE,qBAAqB,EAAE,IAAI,CAAC,CAAC;SAC3F;QAAC,OAAO,GAAG,EAAE;YACV,IAAI,GAAG,YAAY,qCAAoB,EAAE;gBACrC,MAAM,GAAG,CAAC;aACb;iBAAM;gBACH,MAAM,IAAI,6BAAY,CAAC,wCAAwC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;aAChG;SACJ;IACL,CAAC;CACJ,CAAA;gCA1BY,qBAAqB;IADjC,IAAA,qBAAU,GAAE;IAMJ,WAAA,IAAA,iBAAM,EAAC,qCAAiB,CAAC,6BAA6B,CAAC,CAAA;qCAC7B,6DAA6B;GANnD,qBAAqB,CA0BjC"}
|
|
@@ -11,15 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
13
|
};
|
|
14
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
15
|
exports.RefreshJISInfotextsTask = void 0;
|
|
25
16
|
const JISContainerToken_1 = require("../../ioc/JISContainerToken");
|
|
@@ -40,12 +31,10 @@ let RefreshJISInfotextsTask = exports.RefreshJISInfotextsTask = class RefreshJIS
|
|
|
40
31
|
this.queueTtl = 60 * 1000; // 1 minute
|
|
41
32
|
}
|
|
42
33
|
/** refresh JIS Infotexts data in database */
|
|
43
|
-
execute(data) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
yield this.infotextsDataService.refreshData(infotexts, infotextsRopidGTFSStops);
|
|
48
|
-
});
|
|
34
|
+
async execute(data) {
|
|
35
|
+
const transformedData = this.infotextsTransformation.transformArray(data);
|
|
36
|
+
const { infotexts, infotextsRopidGTFSStops } = this.getEntitiesFromTransformationResult(transformedData);
|
|
37
|
+
await this.infotextsDataService.refreshData(infotexts, infotextsRopidGTFSStops);
|
|
49
38
|
}
|
|
50
39
|
getEntitiesFromTransformationResult(transformedData) {
|
|
51
40
|
const infotextEntities = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RefreshJISInfotextsTask.js","sourceRoot":"","sources":["../../../../../src/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RefreshJISInfotextsTask.js","sourceRoot":"","sources":["../../../../../src/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mEAAkE;AAClE,oFAAmF;AACnF,iGAAgG;AAEhG,iEAAwE;AACxE,4CAA+C;AAC/C,iHAA8G;AAC9G,kHAAqF;AACrF,mFAAkF;AAK3E,IAAM,uBAAuB,qCAA7B,MAAM,uBAAwB,SAAQ,+CAAsC;IAK/E,YAEI,oBAAqD,EAErD,uBAA2D;QAE3D,KAAK,CAAC,2BAAe,CAAC,WAAW,EAAE,CAAC,CAAC;QAJ7B,yBAAoB,GAApB,oBAAoB,CAAyB;QAE7C,4BAAuB,GAAvB,uBAAuB,CAA4B;QAR/C,WAAM,GAAG,IAAI,uCAAmB,CAAC,4BAA4B,EAAE,+CAAsB,CAAC,CAAC;QACvF,cAAS,GAAG,qBAAqB,CAAC;QAClC,aAAQ,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,WAAW;IASjD,CAAC;IAED,6CAA6C;IACnC,KAAK,CAAC,OAAO,CAAC,IAAoB;QACxC,MAAM,eAAe,GAAG,IAAI,CAAC,uBAAuB,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAC1E,MAAM,EAAE,SAAS,EAAE,uBAAuB,EAAE,GAAG,IAAI,CAAC,mCAAmC,CAAC,eAAe,CAAC,CAAC;QACzG,MAAM,IAAI,CAAC,oBAAoB,CAAC,WAAW,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAC;IACpF,CAAC;IAEO,mCAAmC,CAAC,eAAyE;QACjH,MAAM,gBAAgB,GAAwB,EAAE,CAAC;QACjD,MAAM,+BAA+B,GAAkC,EAAE,CAAC;QAC1E,KAAK,MAAM,EAAE,QAAQ,EAAE,uBAAuB,EAAE,IAAI,eAAe,EAAE;YACjE,IAAI,uBAAuB,CAAC,MAAM,KAAK,CAAC,EAAE;gBACtC,SAAS;aACZ;YACD,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAChC,+BAA+B,CAAC,IAAI,CAAC,GAAG,uBAAuB,CAAC,CAAC;SACpE;QACD,OAAO;YACH,SAAS,EAAE,gBAAgB;YAC3B,uBAAuB,EAAE,+BAA+B;SAC3D,CAAC;IACN,CAAC;CACJ,CAAA;kCApCY,uBAAuB;IADnC,IAAA,qBAAU,GAAE;IAOJ,WAAA,IAAA,iBAAM,EAAC,qCAAiB,CAAC,uBAAuB,CAAC,CAAA;IAEjD,WAAA,IAAA,iBAAM,EAAC,qCAAiB,CAAC,0BAA0B,CAAC,CAAA;qCADvB,iDAAuB;QAEpB,uDAA0B;GATtD,uBAAuB,CAoCnC"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
@@ -29,10 +20,10 @@ class RopidGTFSStopTimesModel extends integration_engine_1.PostgresModel {
|
|
|
29
20
|
pgSchema: const_1.PG_SCHEMA,
|
|
30
21
|
savingType: "insertOnly",
|
|
31
22
|
}, new golemio_validator_1.JSONSchemaValidator(ropid_gtfs_1.RopidGTFS.stop_times.name + "ModelValidator", StopTimesDto_1.StopTimesDto.jsonSchema));
|
|
32
|
-
this.findTripStops = (tripIds) =>
|
|
23
|
+
this.findTripStops = async (tripIds) => {
|
|
33
24
|
const connection = connectors_1.PostgresConnector.getConnection();
|
|
34
25
|
try {
|
|
35
|
-
return
|
|
26
|
+
return await connection.query(`
|
|
36
27
|
SELECT t1.trip_id, array_to_json(array_agg(
|
|
37
28
|
json_build_object('stop_id', t1.stop_id, 'stop_sequence', t1.stop_sequence, 'cis', t2.cis)
|
|
38
29
|
ORDER BY t1.stop_sequence
|
|
@@ -47,7 +38,7 @@ class RopidGTFSStopTimesModel extends integration_engine_1.PostgresModel {
|
|
|
47
38
|
catch (err) {
|
|
48
39
|
throw new golemio_errors_1.GeneralError("Cannot find trip stops", this.name, err);
|
|
49
40
|
}
|
|
50
|
-
}
|
|
41
|
+
};
|
|
51
42
|
}
|
|
52
43
|
}
|
|
53
44
|
exports.RopidGTFSStopTimesModel = RopidGTFSStopTimesModel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RopidGTFSStopTimesModel.js","sourceRoot":"","sources":["../../../src/integration-engine/ropid-gtfs/RopidGTFSStopTimesModel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RopidGTFSStopTimesModel.js","sourceRoot":"","sources":["../../../src/integration-engine/ropid-gtfs/RopidGTFSStopTimesModel.ts"],"names":[],"mappings":";;;;;;AAAA,0DAAuC;AACvC,oEAA4C;AAC5C,0FAAmE;AACnE,8EAA8E;AAC9E,iFAAqF;AACrF,6EAAwE;AACxE,mFAA8F;AAC9F,oFAA4D;AAa5D,MAAa,uBAAwB,SAAQ,kCAAa;IAYtD;QACI,KAAK,CACD,sBAAS,CAAC,UAAU,CAAC,IAAI,GAAG,OAAO,EACnC;YACI,yBAAyB,EAAE,sBAAS,CAAC,UAAU,CAAC,yBAAyB;YACzE,WAAW,EAAE,sBAAS,CAAC,UAAU,CAAC,WAAW;YAC7C,QAAQ,EAAE,iBAAS;YACnB,UAAU,EAAE,YAAY;SAC3B,EACD,IAAI,uCAAmB,CAAC,sBAAS,CAAC,UAAU,CAAC,IAAI,GAAG,gBAAgB,EAAE,2BAAY,CAAC,UAAU,CAAC,CACjG,CAAC;QAGC,kBAAa,GAAG,KAAK,EAAE,OAAiB,EAA+B,EAAE;YAC5E,MAAM,UAAU,GAAG,8BAAiB,CAAC,aAAa,EAAE,CAAC;YACrD,IAAI;gBACA,OAAO,MAAM,UAAU,CAAC,KAAK,CACzB;;;;;2BAKW,iBAAS,KAAK,IAAI,CAAC,SAAS;gCACvB,iBAAS,KAAK,sBAAS,CAAC,SAAS,CAAC,WAAW;;2CAElC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,GAAG,MAAM,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;;iBAE/E,EACD,EAAE,IAAI,EAAE,mBAAS,CAAC,UAAU,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,CACnD,CAAC;aACL;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAAC,wBAAwB,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;aACpE;QACL,CAAC,CAAC;IAtBF,CAAC;CAuBJ;AA9CD,0DA8CC"}
|
|
@@ -8,15 +8,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
12
|
exports.RopidGTFSStopsModel = void 0;
|
|
22
13
|
const const_1 = require("../../schema-definitions/const");
|
|
@@ -34,14 +25,14 @@ let RopidGTFSStopsModel = exports.RopidGTFSStopsModel = class RopidGTFSStopsMode
|
|
|
34
25
|
pgSchema: const_1.PG_SCHEMA,
|
|
35
26
|
savingType: "insertOnly",
|
|
36
27
|
}, new golemio_validator_1.JSONSchemaValidator(ropid_gtfs_1.RopidGTFS.stops.name + "ModelValidator", StopDto_1.StopDto.jsonSchema));
|
|
37
|
-
this.getAll = () =>
|
|
28
|
+
this.getAll = async () => {
|
|
38
29
|
try {
|
|
39
30
|
return this.sequelizeModel.findAll();
|
|
40
31
|
}
|
|
41
32
|
catch (err) {
|
|
42
33
|
throw new golemio_errors_1.GeneralError("Database error", "RopidGTFSStopsModel", err, 500);
|
|
43
34
|
}
|
|
44
|
-
}
|
|
35
|
+
};
|
|
45
36
|
}
|
|
46
37
|
};
|
|
47
38
|
exports.RopidGTFSStopsModel = RopidGTFSStopsModel = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RopidGTFSStopsModel.js","sourceRoot":"","sources":["../../../src/integration-engine/ropid-gtfs/RopidGTFSStopsModel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RopidGTFSStopsModel.js","sourceRoot":"","sources":["../../../src/integration-engine/ropid-gtfs/RopidGTFSStopsModel.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0DAAuC;AACvC,oEAA4C;AAE5C,gFAAyD;AACzD,8EAA8E;AAC9E,6EAAwE;AACxE,mFAA8F;AAE9F,iEAAgE;AAEzD,IAAM,mBAAmB,iCAAzB,MAAM,mBAAoB,SAAQ,kCAAa;IAYlD;QACI,KAAK,CACD,sBAAS,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,EAC9B;YACI,yBAAyB,EAAE,sBAAS,CAAC,KAAK,CAAC,yBAAyB;YACpE,WAAW,EAAE,sBAAS,CAAC,KAAK,CAAC,WAAW;YACxC,QAAQ,EAAE,iBAAS;YACnB,UAAU,EAAE,YAAY;SAC3B,EACD,IAAI,uCAAmB,CAAC,sBAAS,CAAC,KAAK,CAAC,IAAI,GAAG,gBAAgB,EAAE,iBAAO,CAAC,UAAU,CAAC,CACvF,CAAC;QAGC,WAAM,GAAG,KAAK,IAAyB,EAAE;YAC5C,IAAI;gBACA,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;aACxC;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAAC,gBAAgB,EAAE,qBAAqB,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;aAC7E;QACL,CAAC,CAAC;IARF,CAAC;CASJ,CAAA;8BAhCY,mBAAmB;IAD/B,IAAA,qBAAU,GAAE;;GACA,mBAAmB,CAgC/B"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
@@ -28,8 +19,8 @@ class RopidGTFSTripsModel extends models_1.PostgresModel {
|
|
|
28
19
|
pgSchema: const_1.PG_SCHEMA,
|
|
29
20
|
savingType: "insertOnly",
|
|
30
21
|
}, new golemio_validator_1.JSONSchemaValidator(ropid_gtfs_1.RopidGTFS.trips.name + "ModelValidator", TripDto_1.TripDto.jsonSchema));
|
|
31
|
-
this.findByIdForDelayComputation = (tripId) =>
|
|
32
|
-
const gtfsTripEntity =
|
|
22
|
+
this.findByIdForDelayComputation = async (tripId) => {
|
|
23
|
+
const gtfsTripEntity = await this.sequelizeModel.findOne({
|
|
33
24
|
attributes: ["shape_id"],
|
|
34
25
|
include: [
|
|
35
26
|
{
|
|
@@ -74,7 +65,7 @@ class RopidGTFSTripsModel extends models_1.PostgresModel {
|
|
|
74
65
|
return null;
|
|
75
66
|
}
|
|
76
67
|
return gtfsTripEntity.toJSON();
|
|
77
|
-
}
|
|
68
|
+
};
|
|
78
69
|
this.modelGTFSStopTimes = new _1.RopidGTFSStopTimesModel();
|
|
79
70
|
this.modelGTFSStops = new _1.RopidGTFSStopsModel();
|
|
80
71
|
this.modelGTFSShapes = new _1.RopidGTFSShapesModel();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RopidGTFSTripsModel.js","sourceRoot":"","sources":["../../../src/integration-engine/ropid-gtfs/RopidGTFSTripsModel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RopidGTFSTripsModel.js","sourceRoot":"","sources":["../../../src/integration-engine/ropid-gtfs/RopidGTFSTripsModel.ts"],"names":[],"mappings":"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"}
|