@golemio/pid 3.4.1-dev.1622321089 → 3.4.1-dev.1622952033

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.
Files changed (426) hide show
  1. package/db/migrations/postgresql/20250103092631-skip-missing.js +53 -0
  2. package/db/migrations/postgresql/sqls/20250103092631-skip-missing-down.sql +184 -0
  3. package/db/migrations/postgresql/sqls/20250103092631-skip-missing-up.sql +195 -0
  4. package/dist/input-gateway/jis/JisInfotextsController.js +4 -13
  5. package/dist/input-gateway/jis/JisInfotextsController.js.map +1 -1
  6. package/dist/input-gateway/jis/JisInfotextsRouter.js +3 -12
  7. package/dist/input-gateway/jis/JisInfotextsRouter.js.map +1 -1
  8. package/dist/input-gateway/ropid-gtfs/RopidGtfsController.js +4 -13
  9. package/dist/input-gateway/ropid-gtfs/RopidGtfsController.js.map +1 -1
  10. package/dist/input-gateway/ropid-gtfs/RopidGtfsRouter.js +3 -12
  11. package/dist/input-gateway/ropid-gtfs/RopidGtfsRouter.js.map +1 -1
  12. package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js +4 -13
  13. package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js.map +1 -1
  14. package/dist/input-gateway/vehicle-positions/VehiclePositionsRouter.js +3 -12
  15. package/dist/input-gateway/vehicle-positions/VehiclePositionsRouter.js.map +1 -1
  16. package/dist/integration-engine/data-retention/workers/tasks/DeleteDataTask.js +4 -15
  17. package/dist/integration-engine/data-retention/workers/tasks/DeleteDataTask.js.map +1 -1
  18. package/dist/integration-engine/data-retention/workers/tasks/TableStorageRetentionTask.js +8 -19
  19. package/dist/integration-engine/data-retention/workers/tasks/TableStorageRetentionTask.js.map +1 -1
  20. package/dist/integration-engine/jis/datasources/JISInfotextsDataSourceFactory.js +1 -1
  21. package/dist/integration-engine/jis/datasources/JISInfotextsDataSourceFactory.js.map +1 -1
  22. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js +56 -72
  23. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js.map +1 -1
  24. package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js +32 -48
  25. package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js.map +1 -1
  26. package/dist/integration-engine/jis/repositories/JISMetadataRepository.js +24 -37
  27. package/dist/integration-engine/jis/repositories/JISMetadataRepository.js.map +1 -1
  28. package/dist/integration-engine/jis/services/JISInfotextsDataService.js +24 -35
  29. package/dist/integration-engine/jis/services/JISInfotextsDataService.js.map +1 -1
  30. package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js +2 -3
  31. package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js.map +1 -1
  32. package/dist/integration-engine/jis/workers/tasks/FetchJISInfotextsTask.js +12 -23
  33. package/dist/integration-engine/jis/workers/tasks/FetchJISInfotextsTask.js.map +1 -1
  34. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js +4 -15
  35. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js.map +1 -1
  36. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopTimesModel.js +3 -12
  37. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopTimesModel.js.map +1 -1
  38. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js +2 -11
  39. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js.map +1 -1
  40. package/dist/integration-engine/ropid-gtfs/RopidGTFSTripsModel.js +3 -12
  41. package/dist/integration-engine/ropid-gtfs/RopidGTFSTripsModel.js.map +1 -1
  42. package/dist/integration-engine/ropid-gtfs/RopidGtfsFacade.js +21 -30
  43. package/dist/integration-engine/ropid-gtfs/RopidGtfsFacade.js.map +1 -1
  44. package/dist/integration-engine/ropid-gtfs/RopidGtfsMetadataRepository.js +20 -29
  45. package/dist/integration-engine/ropid-gtfs/RopidGtfsMetadataRepository.js.map +1 -1
  46. package/dist/integration-engine/ropid-gtfs/data-access/RopidGtfsRepository.js +33 -52
  47. package/dist/integration-engine/ropid-gtfs/data-access/RopidGtfsRepository.js.map +1 -1
  48. package/dist/integration-engine/ropid-gtfs/data-access/RouteSubAgencyRepository.js +12 -23
  49. package/dist/integration-engine/ropid-gtfs/data-access/RouteSubAgencyRepository.js.map +1 -1
  50. package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js +12 -23
  51. package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js.map +1 -1
  52. package/dist/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.js +33 -44
  53. package/dist/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.js.map +1 -1
  54. package/dist/integration-engine/ropid-gtfs/data-access/cache/RunTripsRedisRepository.js +2 -1
  55. package/dist/integration-engine/ropid-gtfs/data-access/cache/RunTripsRedisRepository.js.map +1 -1
  56. package/dist/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.js +10 -21
  57. package/dist/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.js.map +1 -1
  58. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.js +15 -24
  59. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.js.map +1 -1
  60. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/MinMaxStopSequencesRepository.js +3 -12
  61. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/MinMaxStopSequencesRepository.js.map +1 -1
  62. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/ServicesCalendarRepository.js +3 -12
  63. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/ServicesCalendarRepository.js.map +1 -1
  64. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripScheduleRepository.js +4 -13
  65. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripScheduleRepository.js.map +1 -1
  66. package/dist/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.js +30 -41
  67. package/dist/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.js.map +1 -1
  68. package/dist/integration-engine/ropid-gtfs/helpers/DataCacheManager.js +11 -22
  69. package/dist/integration-engine/ropid-gtfs/helpers/DataCacheManager.js.map +1 -1
  70. package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.js +1 -2
  71. package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.js.map +1 -1
  72. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSCisStopsTransformation.js +7 -16
  73. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSCisStopsTransformation.js.map +1 -1
  74. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSOisTransformation.js +3 -12
  75. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSOisTransformation.js.map +1 -1
  76. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.js +13 -17
  77. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.js.map +1 -1
  78. package/dist/integration-engine/ropid-gtfs/workers/presets/data-access/PresetLogRepository.js +13 -22
  79. package/dist/integration-engine/ropid-gtfs/workers/presets/data-access/PresetLogRepository.js.map +1 -1
  80. package/dist/integration-engine/ropid-gtfs/workers/presets/datasources/grafana-loki/GrafanaLokiDataSourceProvider.js +1 -2
  81. package/dist/integration-engine/ropid-gtfs/workers/presets/datasources/grafana-loki/GrafanaLokiDataSourceProvider.js.map +1 -1
  82. package/dist/integration-engine/ropid-gtfs/workers/presets/helpers/RopidMonitoringService.js +12 -23
  83. package/dist/integration-engine/ropid-gtfs/workers/presets/helpers/RopidMonitoringService.js.map +1 -1
  84. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CheckForNewDeparturesPresetsTask.js +14 -25
  85. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CheckForNewDeparturesPresetsTask.js.map +1 -1
  86. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CollectAndSaveLogsTask.js +26 -37
  87. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CollectAndSaveLogsTask.js.map +1 -1
  88. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/DownloadDeparturesPresetsTask.js +12 -23
  89. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/DownloadDeparturesPresetsTask.js.map +1 -1
  90. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/ProcessAndSendLogsTask.js +36 -49
  91. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/ProcessAndSendLogsTask.js.map +1 -1
  92. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/SavePresetsDataTask.js +3 -14
  93. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/SavePresetsDataTask.js.map +1 -1
  94. package/dist/integration-engine/ropid-gtfs/workers/presets/transformations/PresetLogTransformation.js +1 -2
  95. package/dist/integration-engine/ropid-gtfs/workers/presets/transformations/PresetLogTransformation.js.map +1 -1
  96. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.js +29 -40
  97. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.js.map +1 -1
  98. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js +64 -81
  99. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js.map +1 -1
  100. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/DownloadDatasetsTask.js +60 -79
  101. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/DownloadDatasetsTask.js.map +1 -1
  102. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPrecomputedTablesTask.js +23 -34
  103. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPrecomputedTablesTask.js.map +1 -1
  104. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPublicGtfsDepartureCacheTask.js +26 -38
  105. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPublicGtfsDepartureCacheTask.js.map +1 -1
  106. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/SaveStaticDataTask.js +21 -32
  107. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/SaveStaticDataTask.js.map +1 -1
  108. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/TransformAndSaveDataTask.js +43 -55
  109. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/TransformAndSaveDataTask.js.map +1 -1
  110. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/DeparturesDirectionRepository.js +8 -18
  111. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/DeparturesDirectionRepository.js.map +1 -1
  112. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/MetroRailtrackGPSRepository.js +11 -21
  113. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/MetroRailtrackGPSRepository.js.map +1 -1
  114. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.js +8 -17
  115. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.js.map +1 -1
  116. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.js +19 -30
  117. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.js.map +1 -1
  118. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/transformations/DeparturesDirectionTransformation.js +8 -1
  119. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/transformations/DeparturesDirectionTransformation.js.map +1 -1
  120. package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.js +31 -47
  121. package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.js.map +1 -1
  122. package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsRoutesModel.js +6 -17
  123. package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsRoutesModel.js.map +1 -1
  124. package/dist/integration-engine/ropid-vymi/models/RopidVYMIMetadataModel.js +4 -14
  125. package/dist/integration-engine/ropid-vymi/models/RopidVYMIMetadataModel.js.map +1 -1
  126. package/dist/integration-engine/ropid-vymi/workers/tasks/CheckForNewEventsTask.js +6 -17
  127. package/dist/integration-engine/ropid-vymi/workers/tasks/CheckForNewEventsTask.js.map +1 -1
  128. package/dist/integration-engine/ropid-vymi/workers/tasks/FetchAndProcessEventsTask.js +34 -31
  129. package/dist/integration-engine/ropid-vymi/workers/tasks/FetchAndProcessEventsTask.js.map +1 -1
  130. package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.js +3 -12
  131. package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.js.map +1 -1
  132. package/dist/integration-engine/shared/RopidMetadataModel.js +35 -45
  133. package/dist/integration-engine/shared/RopidMetadataModel.js.map +1 -1
  134. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertsGenerator.js +13 -24
  135. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertsGenerator.js.map +1 -1
  136. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/VehicleDescriptor.js +9 -6
  137. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/VehicleDescriptor.js.map +1 -1
  138. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.js +113 -128
  139. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.js.map +1 -1
  140. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.js +20 -34
  141. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.js.map +1 -1
  142. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/AbstractRunRepository.js +3 -12
  143. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/AbstractRunRepository.js.map +1 -1
  144. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsMessagesRepository.js +3 -12
  145. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsMessagesRepository.js.map +1 -1
  146. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsRepository.js +12 -21
  147. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsRepository.js.map +1 -1
  148. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/CommonMessageProcessor.js +7 -16
  149. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/CommonMessageProcessor.js.map +1 -1
  150. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/CisLookupManager.js +22 -33
  151. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/CisLookupManager.js.map +1 -1
  152. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/GtfsLookupManager.js +31 -44
  153. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/GtfsLookupManager.js.map +1 -1
  154. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusRunsFacade.js +14 -25
  155. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusRunsFacade.js.map +1 -1
  156. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/TripScheduleManager.js +25 -37
  157. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/TripScheduleManager.js.map +1 -1
  158. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessMetroRunMessagesTask.js +53 -63
  159. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessMetroRunMessagesTask.js.map +1 -1
  160. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessRegionalBusRunMessagesTask.js +57 -72
  161. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessRegionalBusRunMessagesTask.js.map +1 -1
  162. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveArrivaCityRunsToDBTask.js +15 -26
  163. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveArrivaCityRunsToDBTask.js.map +1 -1
  164. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveBusRunsToDBTask.js +10 -21
  165. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveBusRunsToDBTask.js.map +1 -1
  166. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveMetroRunsToDBTask.js +19 -30
  167. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveMetroRunsToDBTask.js.map +1 -1
  168. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveTramRunsToDBTask.js +10 -21
  169. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveTramRunsToDBTask.js.map +1 -1
  170. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/CommonRunsMessagesTransformation.js +5 -14
  171. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/CommonRunsMessagesTransformation.js.map +1 -1
  172. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessageProcessingTransformation.js +4 -14
  173. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessageProcessingTransformation.js.map +1 -1
  174. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/RegionalBusRunsMessagesTransformation.js +1 -2
  175. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/RegionalBusRunsMessagesTransformation.js.map +1 -1
  176. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/data-access/DescriptorRepository.js +35 -49
  177. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/data-access/DescriptorRepository.js.map +1 -1
  178. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/tasks/RefreshDescriptorsTask.js +11 -22
  179. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/tasks/RefreshDescriptorsTask.js.map +1 -1
  180. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.js +2 -3
  181. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.js.map +1 -1
  182. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/CisStopRepository.js +3 -12
  183. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/CisStopRepository.js.map +1 -1
  184. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsHistoryRepository.js +3 -12
  185. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsHistoryRepository.js.map +1 -1
  186. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsRepository.js +19 -29
  187. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsRepository.js.map +1 -1
  188. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/StopTimesHistoryRepository.js +3 -12
  189. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/StopTimesHistoryRepository.js.map +1 -1
  190. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsHistoryRepository.js +3 -12
  191. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsHistoryRepository.js.map +1 -1
  192. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js +58 -55
  193. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js.map +1 -1
  194. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicApiCacheRepository.js +64 -79
  195. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicApiCacheRepository.js.map +1 -1
  196. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicStopTimeCacheRepository.js +46 -59
  197. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicStopTimeCacheRepository.js.map +1 -1
  198. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsMapper.js +39 -6
  199. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsMapper.js.map +1 -1
  200. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/metro/CachedMetroRailtrackLookup.js +8 -19
  201. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/metro/CachedMetroRailtrackLookup.js.map +1 -1
  202. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/PublicStopTimeRepository.js +2 -13
  203. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/PublicStopTimeRepository.js.map +1 -1
  204. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DPPUtils.js +1 -2
  205. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DPPUtils.js.map +1 -1
  206. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DelayComputationManager.js +10 -16
  207. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DelayComputationManager.js.map +1 -1
  208. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js +68 -40
  209. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js.map +1 -1
  210. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/TripStopsManager.js +5 -14
  211. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/TripStopsManager.js.map +1 -1
  212. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/VPUtils.js +1 -2
  213. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/VPUtils.js.map +1 -1
  214. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/anchor-points/AnchorPointSegmenter.js +1 -2
  215. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/anchor-points/AnchorPointSegmenter.js.map +1 -1
  216. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/ComputeDelayHelper.js +4 -4
  217. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/ComputeDelayHelper.js.map +1 -1
  218. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/AbstractDelayAtStop.js +1 -2
  219. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/AbstractDelayAtStop.js.map +1 -1
  220. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/CommonDelayAtStop.js +4 -5
  221. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/CommonDelayAtStop.js.map +1 -1
  222. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/MetroDelayAtStop.js +3 -4
  223. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/MetroDelayAtStop.js.map +1 -1
  224. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-data/strategy/HttpGtfsTripDataFixer.js +7 -18
  225. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-data/strategy/HttpGtfsTripDataFixer.js.map +1 -1
  226. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/AbstractGTFSTripRunManager.js +7 -16
  227. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/AbstractGTFSTripRunManager.js.map +1 -1
  228. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripCommonRunManager.js +40 -57
  229. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripCommonRunManager.js.map +1 -1
  230. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripMetroRunManager.js +36 -53
  231. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripMetroRunManager.js.map +1 -1
  232. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/metro/MetroShapePointsFixer.js +32 -41
  233. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/metro/MetroShapePointsFixer.js.map +1 -1
  234. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js +61 -33
  235. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js.map +1 -1
  236. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/RegionalBusComputeDelayHelper.js +4 -4
  237. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/RegionalBusComputeDelayHelper.js.map +1 -1
  238. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/strategy/BusDelayAtStop.js +4 -6
  239. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/strategy/BusDelayAtStop.js.map +1 -1
  240. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/gtfs-trip-run/GtfsTripRegionalBusRunManager.js +38 -55
  241. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/gtfs-trip-run/GtfsTripRegionalBusRunManager.js.map +1 -1
  242. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/DataRetentionTask.js +32 -45
  243. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/DataRetentionTask.js.map +1 -1
  244. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/ProcessRegionalBusPositionsTask.js +81 -91
  245. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/ProcessRegionalBusPositionsTask.js.map +1 -1
  246. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateDelayTask.js +43 -55
  247. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateDelayTask.js.map +1 -1
  248. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js +37 -49
  249. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js.map +1 -1
  250. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshGtfsTripDataTask.js +7 -18
  251. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshGtfsTripDataTask.js.map +1 -1
  252. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js +41 -52
  253. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js.map +1 -1
  254. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicTripCacheTask.js +32 -43
  255. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicTripCacheTask.js.map +1 -1
  256. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.js +95 -115
  257. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.js.map +1 -1
  258. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateDelayTask.js +150 -162
  259. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateDelayTask.js.map +1 -1
  260. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateGtfsTripIdTask.js +82 -94
  261. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateGtfsTripIdTask.js.map +1 -1
  262. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateRunsGtfsTripIdTask.js +24 -35
  263. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateRunsGtfsTripIdTask.js.map +1 -1
  264. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/abstract/AbstractPropagateDelayTask.js +15 -18
  265. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/abstract/AbstractPropagateDelayTask.js.map +1 -1
  266. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/helpers/UpdateDelayLimiter.js +1 -1
  267. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/helpers/UpdateDelayLimiter.js.map +1 -1
  268. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js +11 -21
  269. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js.map +1 -1
  270. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js +2 -3
  271. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js.map +1 -1
  272. package/dist/output-gateway/pid/controllers/v2/V2DepartureBoardsController.js +5 -15
  273. package/dist/output-gateway/pid/controllers/v2/V2DepartureBoardsController.js.map +1 -1
  274. package/dist/output-gateway/pid/controllers/v2/V2InfotextsController.js +4 -13
  275. package/dist/output-gateway/pid/controllers/v2/V2InfotextsController.js.map +1 -1
  276. package/dist/output-gateway/pid/controllers/v3/V3InfotextsController.js +4 -13
  277. package/dist/output-gateway/pid/controllers/v3/V3InfotextsController.js.map +1 -1
  278. package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.d.ts +1 -0
  279. package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js +20 -20
  280. package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js.map +1 -1
  281. package/dist/output-gateway/pid/data-access/DeparturesRepository.js +40 -53
  282. package/dist/output-gateway/pid/data-access/DeparturesRepository.js.map +1 -1
  283. package/dist/output-gateway/pid/data-access/JISInfotextRepository.js +62 -75
  284. package/dist/output-gateway/pid/data-access/JISInfotextRepository.js.map +1 -1
  285. package/dist/output-gateway/pid/domain/DepartureInterfaces.d.ts +7 -0
  286. package/dist/output-gateway/pid/domain/DepartureInterfaces.js +3 -0
  287. package/dist/output-gateway/pid/domain/DepartureInterfaces.js.map +1 -0
  288. package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js +2 -3
  289. package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js.map +1 -1
  290. package/dist/output-gateway/pid/helpers/ParamValidatorManager.js +6 -15
  291. package/dist/output-gateway/pid/helpers/ParamValidatorManager.js.map +1 -1
  292. package/dist/output-gateway/pid/index.d.ts +4 -5
  293. package/dist/output-gateway/pid/index.js +1 -0
  294. package/dist/output-gateway/pid/index.js.map +1 -1
  295. package/dist/output-gateway/pid/ioc/Di.js +4 -0
  296. package/dist/output-gateway/pid/ioc/Di.js.map +1 -1
  297. package/dist/output-gateway/pid/ioc/OgPidToken.d.ts +2 -0
  298. package/dist/output-gateway/pid/ioc/OgPidToken.js +2 -0
  299. package/dist/output-gateway/pid/ioc/OgPidToken.js.map +1 -1
  300. package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.d.ts +14 -28
  301. package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js +195 -84
  302. package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js.map +1 -1
  303. package/dist/output-gateway/pid/models/RopidDeparturesDirectionsModel.js +20 -27
  304. package/dist/output-gateway/pid/models/RopidDeparturesDirectionsModel.js.map +1 -1
  305. package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.js +16 -25
  306. package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.js.map +1 -1
  307. package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js +28 -18
  308. package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js.map +1 -1
  309. package/dist/output-gateway/pid/models/helpers/SkipHelper.d.ts +19 -0
  310. package/dist/output-gateway/pid/models/helpers/SkipHelper.js +116 -0
  311. package/dist/output-gateway/pid/models/helpers/SkipHelper.js.map +1 -0
  312. package/dist/output-gateway/pid/models/helpers/const.d.ts +4 -0
  313. package/dist/output-gateway/pid/models/helpers/const.js +8 -0
  314. package/dist/output-gateway/pid/models/helpers/const.js.map +1 -0
  315. package/dist/output-gateway/pid/models/helpers/interfaces/IPIDDepartureQueryOptions.d.ts +4 -1
  316. package/dist/output-gateway/pid/models/interfaces/IGetDeparturesOptions.d.ts +21 -0
  317. package/dist/output-gateway/pid/models/interfaces/IGetDeparturesOptions.js +3 -0
  318. package/dist/output-gateway/pid/models/interfaces/IGetDeparturesOptions.js.map +1 -0
  319. package/dist/output-gateway/pid/routers/v3/V3PIDRouter.js +1 -1
  320. package/dist/output-gateway/pid/routers/v3/V3PIDRouter.js.map +1 -1
  321. package/dist/output-gateway/pid/service/facade/InfotextFacade.js +12 -23
  322. package/dist/output-gateway/pid/service/facade/InfotextFacade.js.map +1 -1
  323. package/dist/output-gateway/pid/service/facade/StopFacade.js +27 -38
  324. package/dist/output-gateway/pid/service/facade/StopFacade.js.map +1 -1
  325. package/dist/output-gateway/pid/service/facade/TransferFacade.d.ts +1 -1
  326. package/dist/output-gateway/pid/service/facade/TransferFacade.js +34 -39
  327. package/dist/output-gateway/pid/service/facade/TransferFacade.js.map +1 -1
  328. package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.js +3 -4
  329. package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.js.map +1 -1
  330. package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.js +8 -12
  331. package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.js.map +1 -1
  332. package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.js +1 -2
  333. package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.js.map +1 -1
  334. package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.js +1 -2
  335. package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.js.map +1 -1
  336. package/dist/output-gateway/public/controllers/v2/V2PublicDepartureBoardsController.js +4 -13
  337. package/dist/output-gateway/public/controllers/v2/V2PublicDepartureBoardsController.js.map +1 -1
  338. package/dist/output-gateway/public/controllers/v2/V2PublicGtfsController.js +4 -13
  339. package/dist/output-gateway/public/controllers/v2/V2PublicGtfsController.js.map +1 -1
  340. package/dist/output-gateway/public/controllers/v2/V2PublicVehiclePositionsController.js +9 -18
  341. package/dist/output-gateway/public/controllers/v2/V2PublicVehiclePositionsController.js.map +1 -1
  342. package/dist/output-gateway/public/data-access/VehicleDescriptorCachedRepository.js +13 -26
  343. package/dist/output-gateway/public/data-access/VehicleDescriptorCachedRepository.js.map +1 -1
  344. package/dist/output-gateway/public/data-access/redis/DelayComputationRepository.js +22 -33
  345. package/dist/output-gateway/public/data-access/redis/DelayComputationRepository.js.map +1 -1
  346. package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js +9 -20
  347. package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js.map +1 -1
  348. package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.js +23 -34
  349. package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.js.map +1 -1
  350. package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.d.ts +4 -2
  351. package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js +178 -175
  352. package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js.map +1 -1
  353. package/dist/output-gateway/public/domain/repository/IVehiclePositionsRepository.d.ts +2 -1
  354. package/dist/output-gateway/public/routers/v2/helpers/CustomStopIdGroupValidator.js +2 -2
  355. package/dist/output-gateway/public/routers/v2/helpers/CustomStopIdGroupValidator.js.map +1 -1
  356. package/dist/output-gateway/public/service/VPSubscriber.js +8 -19
  357. package/dist/output-gateway/public/service/VPSubscriber.js.map +1 -1
  358. package/dist/output-gateway/public/service/facade/DepartureBoardFacade.js +100 -117
  359. package/dist/output-gateway/public/service/facade/DepartureBoardFacade.js.map +1 -1
  360. package/dist/output-gateway/public/service/facade/DetailedTripFacade.js +18 -29
  361. package/dist/output-gateway/public/service/facade/DetailedTripFacade.js.map +1 -1
  362. package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.js +20 -31
  363. package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.js.map +1 -1
  364. package/dist/output-gateway/public/service/facade/VehiclePositionsFacade.js +15 -26
  365. package/dist/output-gateway/public/service/facade/VehiclePositionsFacade.js.map +1 -1
  366. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.js +1 -2
  367. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.js.map +1 -1
  368. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.js +3 -14
  369. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.js.map +1 -1
  370. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.js +7 -18
  371. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.js.map +1 -1
  372. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.js +35 -46
  373. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.js.map +1 -1
  374. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.js +16 -22
  375. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.js.map +1 -1
  376. package/dist/output-gateway/public/service/transformations/PublicDepartureTransformation.js +9 -10
  377. package/dist/output-gateway/public/service/transformations/PublicDepartureTransformation.js.map +1 -1
  378. package/dist/output-gateway/public/service/transformations/PublicVehiclePositionsTransformation.js +5 -15
  379. package/dist/output-gateway/public/service/transformations/PublicVehiclePositionsTransformation.js.map +1 -1
  380. package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.js +2 -3
  381. package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.js.map +1 -1
  382. package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripInfoTransformation.js +2 -15
  383. package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripInfoTransformation.js.map +1 -1
  384. package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripStopTimesTransformation.js +1 -13
  385. package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripStopTimesTransformation.js.map +1 -1
  386. package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.js +14 -25
  387. package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.js.map +1 -1
  388. package/dist/output-gateway/ropid-gtfs/data-access/redis/RunTripsRedisRepository.d.ts +10 -0
  389. package/dist/output-gateway/ropid-gtfs/data-access/redis/RunTripsRedisRepository.js +65 -0
  390. package/dist/output-gateway/ropid-gtfs/data-access/redis/RunTripsRedisRepository.js.map +1 -0
  391. package/dist/output-gateway/ropid-gtfs/domain/repository/IRunTripsRedisRepository.d.ts +4 -0
  392. package/dist/output-gateway/ropid-gtfs/domain/repository/IRunTripsRedisRepository.js +3 -0
  393. package/dist/output-gateway/ropid-gtfs/domain/repository/IRunTripsRedisRepository.js.map +1 -0
  394. package/dist/output-gateway/ropid-gtfs/models/GTFSCalendarModel.js +3 -12
  395. package/dist/output-gateway/ropid-gtfs/models/GTFSCalendarModel.js.map +1 -1
  396. package/dist/output-gateway/ropid-gtfs/models/GTFSRoutesModel.js +4 -13
  397. package/dist/output-gateway/ropid-gtfs/models/GTFSRoutesModel.js.map +1 -1
  398. package/dist/output-gateway/ropid-gtfs/models/GTFSShapesModel.js +5 -14
  399. package/dist/output-gateway/ropid-gtfs/models/GTFSShapesModel.js.map +1 -1
  400. package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js +90 -102
  401. package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js.map +1 -1
  402. package/dist/output-gateway/ropid-gtfs/models/GTFSStopTimesModel.js +3 -12
  403. package/dist/output-gateway/ropid-gtfs/models/GTFSStopTimesModel.js.map +1 -1
  404. package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.js +43 -51
  405. package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.js.map +1 -1
  406. package/dist/output-gateway/ropid-gtfs/routers/v2/V2GTFSRouter.js +28 -37
  407. package/dist/output-gateway/ropid-gtfs/routers/v2/V2GTFSRouter.js.map +1 -1
  408. package/dist/output-gateway/shared/DepartureCalculator.js +1 -1
  409. package/dist/output-gateway/shared/DepartureCalculator.js.map +1 -1
  410. package/dist/output-gateway/shared/constants/validations.js +1 -1
  411. package/dist/output-gateway/shared/constants/validations.js.map +1 -1
  412. package/dist/output-gateway/vehicle-positions/data-access/helpers/PositionOutputMapper.js +40 -48
  413. package/dist/output-gateway/vehicle-positions/data-access/helpers/PositionOutputMapper.js.map +1 -1
  414. package/dist/output-gateway/vehicle-positions/data-access/views/TripWithLastPositionRepository.js +7 -16
  415. package/dist/output-gateway/vehicle-positions/data-access/views/TripWithLastPositionRepository.js.map +1 -1
  416. package/dist/output-gateway/vehicle-positions/routers/v2/V2VehiclePositionsRouter.js +10 -19
  417. package/dist/output-gateway/vehicle-positions/routers/v2/V2VehiclePositionsRouter.js.map +1 -1
  418. package/dist/schema-definitions/ropid-gtfs/RopidGTFSRunNumbers.js +5 -2
  419. package/dist/schema-definitions/ropid-gtfs/RopidGTFSRunNumbers.js.map +1 -1
  420. package/dist/schema-definitions/ropid-gtfs/index.js +16 -4
  421. package/dist/schema-definitions/ropid-gtfs/index.js.map +1 -1
  422. package/dist/schema-definitions/ropid-gtfs/redis/const.d.ts +1 -0
  423. package/dist/schema-definitions/ropid-gtfs/redis/const.js +2 -1
  424. package/dist/schema-definitions/ropid-gtfs/redis/const.js.map +1 -1
  425. package/docs/openapi-output.yaml +11 -3
  426. package/package.json +2 -2
@@ -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
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.CheckSavedRowsAndReplaceTablesTask = void 0;
13
4
  const DataCacheManager_1 = require("../../../helpers/DataCacheManager");
@@ -34,81 +25,73 @@ class CheckSavedRowsAndReplaceTablesTask extends workers_1.AbstractTask {
34
25
  this.ropidGtfsRepository = Di_1.RopidGtfsContainer.resolve(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGtfsRepository);
35
26
  this.ropidGtfsFacade = Di_1.RopidGtfsContainer.resolve(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGtfsFacade);
36
27
  }
37
- execute(data) {
38
- return __awaiter(this, void 0, void 0, function* () {
39
- const { notDeployed, datasetDeployInfo } = yield this.getDatasetsToDeploy(data);
40
- if (data.datasets.length !== notDeployed.length) {
41
- const names = notDeployed.map((el) => el.dataset);
42
- this.logger.error(`Error while synchronized download of datasets: [${names}] of [${data.datasets}] deployed already`);
43
- }
44
- if (!notDeployed.length) {
45
- this.logger.debug(`Datasets status: already deployed`);
46
- return;
47
- }
48
- const notDeployedVersions = notDeployed.map((el) => ({ dataset: el.dataset, version: el.lastModified.version }));
49
- const allSaved = yield this.metadataRepository.checkAllTablesHasSavedState(notDeployedVersions);
50
- try {
51
- yield this.checkSavedRows(allSaved, datasetDeployInfo);
52
- yield this.precomputeTablesFacade.createAndPopulatePrecomputedTmpTables(SourceTableSuffixEnum_1.SourceTableSuffixEnum.Tmp);
53
- yield this.ropidGtfsFacade.replaceTables(notDeployedVersions);
54
- yield this.dataCacheManager.cleanCache();
55
- yield this.ropidGtfsRepository.cleanTmpAndOldTables();
56
- const rabbitExchangeName = this.config.getValue("env.RABBIT_EXCHANGE_NAME");
57
- // send message to VP worker to refresh GTFS trip data (see task description for more info)
58
- yield integration_engine_1.QueueManager.sendMessageToExchange(`${rabbitExchangeName}.${constants_1.WORKER_NAME.toLowerCase()}`, "refreshGTFSTripData", {});
59
- // send message to GTFS timetable worker to refresh public GTFS departure cache
60
- // so that the new data is available in the public (Lítačka) API
61
- yield integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "refreshPublicGtfsDepartureCache", {});
62
- }
63
- catch (err) {
64
- yield this.retryOrThrow(notDeployedVersions, data, err);
65
- }
66
- });
28
+ async execute(data) {
29
+ const { notDeployed, datasetDeployInfo } = await this.getDatasetsToDeploy(data);
30
+ if (data.datasets.length !== notDeployed.length) {
31
+ const names = notDeployed.map((el) => el.dataset);
32
+ this.logger.error(`Error while synchronized download of datasets: [${names}] of [${data.datasets}] deployed already`);
33
+ }
34
+ if (!notDeployed.length) {
35
+ this.logger.debug(`Datasets status: already deployed`);
36
+ return;
37
+ }
38
+ const notDeployedVersions = notDeployed.map((el) => ({ dataset: el.dataset, version: el.lastModified.version }));
39
+ const allSaved = await this.metadataRepository.checkAllTablesHasSavedState(notDeployedVersions);
40
+ try {
41
+ await this.checkSavedRows(allSaved, datasetDeployInfo);
42
+ await this.precomputeTablesFacade.createAndPopulatePrecomputedTmpTables(SourceTableSuffixEnum_1.SourceTableSuffixEnum.Tmp);
43
+ await this.ropidGtfsFacade.replaceTables(notDeployedVersions);
44
+ await this.dataCacheManager.cleanCache();
45
+ await this.ropidGtfsRepository.cleanTmpAndOldTables();
46
+ const rabbitExchangeName = this.config.getValue("env.RABBIT_EXCHANGE_NAME");
47
+ // send message to VP worker to refresh GTFS trip data (see task description for more info)
48
+ await integration_engine_1.QueueManager.sendMessageToExchange(`${rabbitExchangeName}.${constants_1.WORKER_NAME.toLowerCase()}`, "refreshGTFSTripData", {});
49
+ // send message to GTFS timetable worker to refresh public GTFS departure cache
50
+ // so that the new data is available in the public (Lítačka) API
51
+ await integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "refreshPublicGtfsDepartureCache", {});
52
+ }
53
+ catch (err) {
54
+ await this.retryOrThrow(notDeployedVersions, data, err);
55
+ }
67
56
  }
68
- retryOrThrow(notDeployedVersions, data, err) {
69
- return __awaiter(this, void 0, void 0, function* () {
70
- // log failed saving process
71
- yield Promise.all(notDeployedVersions.map((el) => __awaiter(this, void 0, void 0, function* () {
72
- yield this.metadataRepository.rollbackFailedSaving(el.dataset, el.version);
73
- })));
74
- // check number of tries
75
- const retries = yield Promise.all(notDeployedVersions.map((el) => __awaiter(this, void 0, void 0, function* () {
76
- return yield this.metadataRepository.getNumberOfDownloadRetries(el.dataset, el.version);
77
- })));
78
- yield this.ropidGtfsRepository.cleanTmpAndOldTables();
79
- if (Math.max(...retries) <= 5) {
80
- // send new downloadFiles, log it and finish
81
- integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "downloadDatasets", data);
82
- integration_engine_1.IntegrationErrorHandler.handle(new golemio_errors_1.GeneralError(`Error while checking RopidGTFS saved rows. Attempt number ${Math.min(...retries)} was resent.`, this.constructor.name, err));
83
- }
84
- else {
85
- // at least refresh precomputed tables and finish with error
86
- integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "refreshPrecomputedTables", {});
87
- throw new golemio_errors_1.GeneralError("Error while checking RopidGTFS saved rows.", this.constructor.name, err);
88
- }
89
- });
57
+ async retryOrThrow(notDeployedVersions, data, err) {
58
+ // log failed saving process
59
+ await Promise.all(notDeployedVersions.map(async (el) => {
60
+ await this.metadataRepository.rollbackFailedSaving(el.dataset, el.version);
61
+ }));
62
+ // check number of tries
63
+ const retries = await Promise.all(notDeployedVersions.map(async (el) => {
64
+ return await this.metadataRepository.getNumberOfDownloadRetries(el.dataset, el.version);
65
+ }));
66
+ await this.ropidGtfsRepository.cleanTmpAndOldTables();
67
+ if (Math.max(...retries) <= 5) {
68
+ // send new downloadFiles, log it and finish
69
+ integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "downloadDatasets", data);
70
+ integration_engine_1.IntegrationErrorHandler.handle(new golemio_errors_1.GeneralError(`Error while checking RopidGTFS saved rows. Attempt number ${Math.min(...retries)} was resent.`, this.constructor.name, err));
71
+ }
72
+ else {
73
+ // at least refresh precomputed tables and finish with error
74
+ integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "refreshPrecomputedTables", {});
75
+ throw new golemio_errors_1.GeneralError("Error while checking RopidGTFS saved rows.", this.constructor.name, err);
76
+ }
90
77
  }
91
- checkSavedRows(allSaved, datasetDeployInfo) {
92
- return __awaiter(this, void 0, void 0, function* () {
93
- if (!allSaved) {
94
- throw new golemio_errors_1.GeneralError("Some GTFS datasets did not properly save", this.constructor.name);
95
- }
96
- yield Promise.all(datasetDeployInfo.map((el) => __awaiter(this, void 0, void 0, function* () {
97
- yield this.ropidGtfsFacade.checkSavedTmpTables(el.dataset, el.lastModified.version);
98
- })));
99
- });
78
+ async checkSavedRows(allSaved, datasetDeployInfo) {
79
+ if (!allSaved) {
80
+ throw new golemio_errors_1.GeneralError("Some GTFS datasets did not properly save", this.constructor.name);
81
+ }
82
+ await Promise.all(datasetDeployInfo.map(async (el) => {
83
+ await this.ropidGtfsFacade.checkSavedTmpTables(el.dataset, el.lastModified.version);
84
+ }));
100
85
  }
101
- getDatasetsToDeploy(data) {
102
- return __awaiter(this, void 0, void 0, function* () {
103
- const datasetDeployInfo = yield Promise.all(data.datasets.map((dataset) => __awaiter(this, void 0, void 0, function* () {
104
- const lastModified = yield this.metadataRepository.getLastModified(dataset);
105
- const isDeployed = yield this.metadataRepository.checkIfNewVersionIsAlreadyDeployed(dataset, lastModified.version);
106
- return { dataset, lastModified, isDeployed };
107
- })));
108
- this.logger.debug(`Datasets status: ${JSON.stringify(datasetDeployInfo)}`);
109
- const notDeployed = datasetDeployInfo.filter((info) => !info.isDeployed);
110
- return { notDeployed, datasetDeployInfo };
111
- });
86
+ async getDatasetsToDeploy(data) {
87
+ const datasetDeployInfo = await Promise.all(data.datasets.map(async (dataset) => {
88
+ const lastModified = await this.metadataRepository.getLastModified(dataset);
89
+ const isDeployed = await this.metadataRepository.checkIfNewVersionIsAlreadyDeployed(dataset, lastModified.version);
90
+ return { dataset, lastModified, isDeployed };
91
+ }));
92
+ this.logger.debug(`Datasets status: ${JSON.stringify(datasetDeployInfo)}`);
93
+ const notDeployed = datasetDeployInfo.filter((info) => !info.isDeployed);
94
+ return { notDeployed, datasetDeployInfo };
112
95
  }
113
96
  }
114
97
  exports.CheckSavedRowsAndReplaceTablesTask = CheckSavedRowsAndReplaceTablesTask;
@@ -1 +1 @@
1
- {"version":3,"file":"CheckSavedRowsAndReplaceTablesTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,wEAA2E;AAC3E,kFAAqF;AACrF,wCAA2D;AAC3D,kFAAqF;AAErF,iGAA0G;AAE1G,wEAAqE;AAErE,8EAA8F;AAC9F,2EAA6E;AAC7E,6EAAwE;AAIxE,8EAAuE;AAEvE,MAAa,kCAAmC,SAAQ,sBAA4B;IAchF,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QAdP,cAAS,GAAG,gCAAgC,CAAC;QAC7C,aAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,WAAW;QAC3C,WAAM,GAAG,6CAAmB,CAAC;QAazC,IAAI,CAAC,MAAM,GAAG,uBAAkB,CAAC,OAAO,CAAU,qBAAS,CAAC,MAAM,CAAC,CAAC;QACpE,IAAI,CAAC,MAAM,GAAG,uBAAkB,CAAC,OAAO,CAAgB,qBAAS,CAAC,YAAY,CAAC,CAAC;QAEhF,IAAI,CAAC,kBAAkB,GAAG,uBAAkB,CAAC,OAAO,CAChD,iDAAuB,CAAC,2BAA2B,CACtD,CAAC;QACF,IAAI,CAAC,g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,IAAoB;;YAClD,MAAM,iBAAiB,GAAG,MAAM,OAAO,CAAC,GAAG,CACvC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAO,OAAO,EAAE,EAAE;gBAChC,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;gBAC5E,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,kCAAkC,CAC/E,OAAO,EACP,YAAY,CAAC,OAAO,CACvB,CAAC;gBACF,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC;YACjD,CAAC,CAAA,CAAC,CACL,CAAC;YAEF,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAoB,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;YAE3E,MAAM,WAAW,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACzE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC;QAC9C,CAAC;KAAA;CACJ;AAjJD,gFAiJC"}
1
+ {"version":3,"file":"CheckSavedRowsAndReplaceTablesTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.ts"],"names":[],"mappings":";;;AAGA,wEAA2E;AAC3E,kFAAqF;AACrF,wCAA2D;AAC3D,kFAAqF;AAErF,iGAA0G;AAE1G,wEAAqE;AAErE,8EAA8F;AAC9F,2EAA6E;AAC7E,6EAAwE;AAIxE,8EAAuE;AAEvE,MAAa,kCAAmC,SAAQ,sBAA4B;IAchF,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QAdP,cAAS,GAAG,gCAAgC,CAAC;QAC7C,aAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,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EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SAC7F;QAED,MAAM,OAAO,CAAC,GAAG,CACb,iBAAiB,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE;YAC/B,MAAM,IAAI,CAAC,eAAe,CAAC,mBAAmB,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QACxF,CAAC,CAAC,CACL,CAAC;IACN,CAAC;IAEO,KAAK,CAAC,mBAAmB,CAAC,IAAoB;QAClD,MAAM,iBAAiB,GAAG,MAAM,OAAO,CAAC,GAAG,CACvC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;YAChC,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;YAC5E,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,kCAAkC,CAC/E,OAAO,EACP,YAAY,CAAC,OAAO,CACvB,CAAC;YACF,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC;QACjD,CAAC,CAAC,CACL,CAAC;QAEF,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAoB,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;QAE3E,MAAM,WAAW,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACzE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC;IAC9C,CAAC;CACJ;AAjJD,gFAiJC"}
@@ -1,24 +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
- var __rest = (this && this.__rest) || function (s, e) {
12
- var t = {};
13
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
- t[p] = s[p];
15
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
- t[p[i]] = s[p[i]];
19
- }
20
- return t;
21
- };
22
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
23
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
24
4
  };
@@ -45,21 +25,21 @@ class DownloadDatasetsTask extends workers_1.AbstractTask {
45
25
  /**
46
26
  * Helper method - download and persist dataset
47
27
  */
48
- this.downloadAndPersistDatasetFiles = (dataset) => __awaiter(this, void 0, void 0, function* () {
28
+ this.downloadAndPersistDatasetFiles = async (dataset) => {
49
29
  this.logger.info(`Datasets: processing ${dataset}`);
50
- let files = yield this.ropidGtfsFactory.getDatasetMap()[dataset].datasource.getAll();
30
+ let files = await this.ropidGtfsFactory.getDatasetMap()[dataset].datasource.getAll();
51
31
  if (!Array.isArray(files))
52
32
  files = [files];
53
- const dbLastModified = yield this.metadataRepository.getLastModified(dataset);
33
+ const dbLastModified = await this.metadataRepository.getLastModified(dataset);
54
34
  const cachedDataset = [];
55
35
  for (const file of files) {
56
36
  this.logger.info(`Datasets: processing file '${file.name}'`);
57
- const { data } = file, meta = __rest(file, ["data"]);
37
+ const { data, ...meta } = file;
58
38
  if (dataset === RopidGtfsFacade_1.DatasetEnum.PID_GTFS || dataset === RopidGtfsFacade_1.DatasetEnum.RUN_NUMBERS) {
59
- yield this.staticFileRedisRepository.pipeStream(file.filepath, data);
39
+ await this.staticFileRedisRepository.pipeStream(file.filepath, data);
60
40
  }
61
41
  else {
62
- yield this.staticFileRedisRepository.set(file.filepath, typeof data === "string" ? data : JSON.stringify(data));
42
+ await this.staticFileRedisRepository.set(file.filepath, typeof data === "string" ? data : JSON.stringify(data));
63
43
  }
64
44
  const key = (0, HelperTypes_1.datasetFileModelMap)(dataset, file.name);
65
45
  const metaStates = (Array.isArray(key) ? key : [key]).map((name) => {
@@ -72,12 +52,15 @@ class DownloadDatasetsTask extends workers_1.AbstractTask {
72
52
  };
73
53
  });
74
54
  for (const metaState of metaStates) {
75
- yield this.metadataRepository.save(metaState);
55
+ await this.metadataRepository.save(metaState);
76
56
  }
77
- cachedDataset.push(Object.assign(Object.assign({}, meta), { dataset }));
57
+ cachedDataset.push({
58
+ ...meta,
59
+ dataset,
60
+ });
78
61
  }
79
- const lastModified = yield this.ropidGtfsFactory.getDatasetMap()[dataset].datasource.getLastModified();
80
- yield this.metadataRepository.save({
62
+ const lastModified = await this.ropidGtfsFactory.getDatasetMap()[dataset].datasource.getLastModified();
63
+ await this.metadataRepository.save({
81
64
  dataset,
82
65
  key: RopidMetadataModel_1.MetaDatasetInfoKeyEnum.LAST_MODIFIED,
83
66
  type: RopidMetadataModel_1.MetaTypeEnum.DATASET_INFO,
@@ -86,7 +69,7 @@ class DownloadDatasetsTask extends workers_1.AbstractTask {
86
69
  });
87
70
  this.logger.info(`Datasets: processing ${dataset} finished - ${JSON.stringify(cachedDataset)}`);
88
71
  return cachedDataset;
89
- });
72
+ };
90
73
  this.logger = Di_1.PidContainer.resolve(CoreToken_1.CoreToken.Logger);
91
74
  this.gtfsRedisChannel = Di_2.RopidGtfsContainer.resolve(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RedisPubSubChannel);
92
75
  this.staticFileRedisRepository = Di_2.RopidGtfsContainer.resolve(RopidGtfsContainerToken_1.RopidGtfsContainerToken.StaticFileRedisRepository);
@@ -94,62 +77,60 @@ class DownloadDatasetsTask extends workers_1.AbstractTask {
94
77
  this.metadataRepository = Di_2.RopidGtfsContainer.resolve(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGtfsMetadataRepository);
95
78
  this.ropidGtfsRepository = Di_2.RopidGtfsContainer.resolve(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGtfsRepository);
96
79
  }
97
- execute(data) {
98
- return __awaiter(this, void 0, void 0, function* () {
99
- this.logger.info(`Datasets: downloading ${data.datasets}`);
100
- /** Ropid GTFS Dataset Map Dependencies **/
101
- this.ropidGtfsFactory = Di_2.RopidGtfsContainer.resolve(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGtfsFactory);
102
- let cachedDatasets = [];
103
- for (const dataset of data.datasets) {
104
- try {
105
- cachedDatasets = cachedDatasets.concat(yield this.downloadAndPersistDatasetFiles(dataset));
106
- }
107
- catch (err) {
108
- yield integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "refreshPrecomputedTables", {});
109
- if (err instanceof golemio_errors_1.AbstractGolemioError) {
110
- throw err;
111
- }
112
- throw new golemio_errors_1.GeneralError("Error while downloading GTFS datasets", this.constructor.name, err);
113
- }
114
- }
115
- yield this.ropidGtfsRepository.createTmpTables();
116
- const subscriber = this.gtfsRedisChannel.createSubscriber({
117
- channelSuffix: os_1.default.hostname(),
118
- maxMessageCount: cachedDatasets.length,
119
- });
120
- yield subscriber.subscribe();
121
- for (const cachedDataset of cachedDatasets) {
122
- integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "transformAndSaveData", cachedDataset, {
123
- headers: {
124
- [HelperTypes_1.ORIGIN_HOSTNAME_HEADER]: os_1.default.hostname(),
125
- },
126
- });
127
- }
128
- // Listen for messages from workers and wait for all of them to finish
129
- // before continuing to the next step (replacing tables)
80
+ async execute(data) {
81
+ this.logger.info(`Datasets: downloading ${data.datasets}`);
82
+ /** Ropid GTFS Dataset Map Dependencies **/
83
+ this.ropidGtfsFactory = Di_2.RopidGtfsContainer.resolve(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGtfsFactory);
84
+ let cachedDatasets = [];
85
+ for (const dataset of data.datasets) {
130
86
  try {
131
- yield subscriber.listen(({ message, messageCount, isFinal }) => {
132
- this.logger.debug(`Datasets: received message: ${message} (${messageCount}/${cachedDatasets.length})`);
133
- if (!message.startsWith("OK")) {
134
- this.logger.error(`Datasets: subscription error: ${message}`);
135
- throw new golemio_errors_1.GeneralError(message, this.constructor.name);
136
- }
137
- if (isFinal) {
138
- this.logger.info("Datasets: all messages received");
139
- }
140
- });
87
+ cachedDatasets = cachedDatasets.concat(await this.downloadAndPersistDatasetFiles(dataset));
141
88
  }
142
89
  catch (err) {
90
+ await integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "refreshPrecomputedTables", {});
143
91
  if (err instanceof golemio_errors_1.AbstractGolemioError) {
144
92
  throw err;
145
93
  }
146
- throw new golemio_errors_1.GeneralError("Error while listening for messages", this.constructor.name, err);
147
- }
148
- finally {
149
- yield subscriber.unsubscribe();
150
- integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "checkSavedRowsAndReplaceTables", data);
94
+ throw new golemio_errors_1.GeneralError("Error while downloading GTFS datasets", this.constructor.name, err);
151
95
  }
96
+ }
97
+ await this.ropidGtfsRepository.createTmpTables();
98
+ const subscriber = this.gtfsRedisChannel.createSubscriber({
99
+ channelSuffix: os_1.default.hostname(),
100
+ maxMessageCount: cachedDatasets.length,
152
101
  });
102
+ await subscriber.subscribe();
103
+ for (const cachedDataset of cachedDatasets) {
104
+ integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "transformAndSaveData", cachedDataset, {
105
+ headers: {
106
+ [HelperTypes_1.ORIGIN_HOSTNAME_HEADER]: os_1.default.hostname(),
107
+ },
108
+ });
109
+ }
110
+ // Listen for messages from workers and wait for all of them to finish
111
+ // before continuing to the next step (replacing tables)
112
+ try {
113
+ await subscriber.listen(({ message, messageCount, isFinal }) => {
114
+ this.logger.debug(`Datasets: received message: ${message} (${messageCount}/${cachedDatasets.length})`);
115
+ if (!message.startsWith("OK")) {
116
+ this.logger.error(`Datasets: subscription error: ${message}`);
117
+ throw new golemio_errors_1.GeneralError(message, this.constructor.name);
118
+ }
119
+ if (isFinal) {
120
+ this.logger.info("Datasets: all messages received");
121
+ }
122
+ });
123
+ }
124
+ catch (err) {
125
+ if (err instanceof golemio_errors_1.AbstractGolemioError) {
126
+ throw err;
127
+ }
128
+ throw new golemio_errors_1.GeneralError("Error while listening for messages", this.constructor.name, err);
129
+ }
130
+ finally {
131
+ await subscriber.unsubscribe();
132
+ integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "checkSavedRowsAndReplaceTables", data);
133
+ }
153
134
  }
154
135
  }
155
136
  exports.DownloadDatasetsTask = DownloadDatasetsTask;
@@ -1 +1 @@
1
- {"version":3,"file":"DownloadDatasetsTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/timetables/tasks/DownloadDatasetsTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA0C;AAC1C,8DAA6D;AAI7D,wCAA2D;AAC3D,kFAAqF;AACrF,8EAAoG;AACpG,wEAAqE;AAErE,8EAA4E;AAE5E,2EAA6E;AAC7E,6EAA8F;AAE9F,4CAAoB;AACpB,uDAAkH;AAGlH,8EAAuE;AAEvE,MAAa,oBAAqB,SAAQ,sBAA4B;IAalE,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QAbP,cAAS,GAAG,kBAAkB,CAAC;QAC/B,aAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,aAAa;QACxC,WAAM,GAAG,6CAAmB,CAAC;QAuF7C;;WAEG;QACK,mCAA8B,GAAG,CAAO,OAAqB,EAA6B,EAAE;YAChG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,wBAAwB,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3,"file":"DownloadDatasetsTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/timetables/tasks/DownloadDatasetsTask.ts"],"names":[],"mappings":";;;;;;AAAA,2CAA0C;AAC1C,8DAA6D;AAI7D,wCAA2D;AAC3D,kFAAqF;AACrF,8EAAoG;AACpG,wEAAqE;AAErE,8EAA4E;AAE5E,2EAA6E;AAC7E,6EAA8F;AAE9F,4CAAoB;AACpB,uDAAkH;AAGlH,8EAAuE;AAEvE,MAAa,oBAAqB,SAAQ,sBAA4B;IAalE,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QAbP,cAAS,GAAG,kBAAkB,CAAC;QAC/B,aAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,aAAa;QACxC,WAAM,GAAG,6CAAmB,CAAC;QAuF7C;;WAEG;QACK,mCAA8B,GAAG,KAAK,EAAE,OAAqB,EAA6B,EAAE;YAChG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,wBAAwB,OAAO,EAAE,CAAC,CAAC;YACpD,IAAI,KAAK,GAAoB,MAAM,IAAI,CAAC,gBAAiB,CAAC,aAAa,EAAE,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;YACvG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;gBAAE,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC;YAE3C,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;YAC9E,MAAM,aAAa,GAAqB,EAAE,CAAC;YAE3C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;gBACtB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,8BAA8B,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;gBAC7D,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;gBAC/B,IAAI,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EAAE,CAAC,CAAC;oBAC9D,MAAM,IAAI,6BAAY,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;iBAC1D;gBAED,IAAI,OAAO,EAAE;oBACT,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;iBACvD;YACL,CAAC,CAAC,CAAC;SACN;QAAC,OAAO,GAAG,EAAE;YACV,IAAI,GAAG,YAAY,qCAAoB,EAAE;gBACrC,MAAM,GAAG,CAAC;aACb;YACD,MAAM,IAAI,6BAAY,CAAC,oCAAoC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SAC5F;gBAAS;YACN,MAAM,UAAU,CAAC,WAAW,EAAE,CAAC;YAC/B,iCAAY,CAAC,qBAAqB,CAAC,IAAI,CAAC,WAAW,EAAE,gCAAgC,EAAE,IAAI,CAAC,CAAC;SAChG;IACL,CAAC;CAwDJ;AAhJD,oDAgJC"}
@@ -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
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.RefreshPrecomputedTablesTask = void 0;
13
4
  const Di_1 = require("../../../../ioc/Di");
@@ -29,31 +20,29 @@ class RefreshPrecomputedTablesTask extends workers_1.AbstractEmptyTask {
29
20
  this.ropidGtfsRepository = Di_2.RopidGtfsContainer.resolve(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGtfsRepository);
30
21
  this.ropidGtfsFacade = Di_2.RopidGtfsContainer.resolve(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGtfsFacade);
31
22
  }
32
- execute() {
33
- return __awaiter(this, void 0, void 0, function* () {
34
- try {
35
- yield this.precomputeTablesFacade.createAndPopulatePrecomputedTmpTables(SourceTableSuffixEnum_1.SourceTableSuffixEnum.Actual);
36
- }
37
- catch (err) {
38
- this.logger.error(err);
39
- throw new golemio_errors_1.GeneralError("Error while creating RopidGTFS precomputed tables", this.constructor.name);
40
- }
41
- const connection = Di_1.PidContainer.resolve(CoreToken_1.CoreToken.PostgresConnector).getConnection();
42
- const transaction = yield connection.transaction();
43
- try {
44
- yield this.ropidGtfsFacade.replacePrecomputedTables(transaction);
45
- yield transaction.commit();
46
- }
47
- catch (err) {
48
- yield transaction.rollback();
49
- this.logger.error(err);
50
- throw new golemio_errors_1.GeneralError("Error while replacing RopidGTFS precomputed tables", this.constructor.name);
51
- }
52
- finally {
53
- yield this.ropidGtfsRepository.cleanOldTables();
54
- }
55
- yield this.dataCacheManager.cleanCache();
56
- });
23
+ async execute() {
24
+ try {
25
+ await this.precomputeTablesFacade.createAndPopulatePrecomputedTmpTables(SourceTableSuffixEnum_1.SourceTableSuffixEnum.Actual);
26
+ }
27
+ catch (err) {
28
+ this.logger.error(err);
29
+ throw new golemio_errors_1.GeneralError("Error while creating RopidGTFS precomputed tables", this.constructor.name);
30
+ }
31
+ const connection = Di_1.PidContainer.resolve(CoreToken_1.CoreToken.PostgresConnector).getConnection();
32
+ const transaction = await connection.transaction();
33
+ try {
34
+ await this.ropidGtfsFacade.replacePrecomputedTables(transaction);
35
+ await transaction.commit();
36
+ }
37
+ catch (err) {
38
+ await transaction.rollback();
39
+ this.logger.error(err);
40
+ throw new golemio_errors_1.GeneralError("Error while replacing RopidGTFS precomputed tables", this.constructor.name);
41
+ }
42
+ finally {
43
+ await this.ropidGtfsRepository.cleanOldTables();
44
+ }
45
+ await this.dataCacheManager.cleanCache();
57
46
  }
58
47
  }
59
48
  exports.RefreshPrecomputedTablesTask = RefreshPrecomputedTablesTask;
@@ -1 +1 @@
1
- {"version":3,"file":"RefreshPrecomputedTablesTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPrecomputedTablesTask.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA0C;AAI1C,wEAA2E;AAC3E,kFAAqF;AACrF,wCAA2D;AAC3D,kFAAqF;AAErF,wEAAqE;AAErE,2EAAkF;AAClF,6EAAwE;AAGxE,MAAa,4BAA6B,SAAQ,2BAAiB;IAW/D,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QAXP,cAAS,GAAG,0BAA0B,CAAC;QACvC,aAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,aAAa;QAWpD,IAAI,CAAC,MAAM,GAAG,uBAAkB,CAAC,OAAO,CAAU,qBAAS,CAAC,MAAM,CAAC,CAAC;QAEpE,IAAI,CAAC,gBAAgB,GAAG,mCAAgB,CAAC,WAAW,EAAE,CAAC;QACvD,IAAI,CAAC,sBAAsB,GAAG,uBAAkB,CAAC,OAAO,CACpD,iDAAuB,CAAC,uBAAuB,CAClD,CAAC;QACF,IAAI,CAAC,mBAAmB,GAAG,uBAAkB,CAAC,OAAO,CAAsB,iDAAuB,CAAC,mBAAmB,CAAC,CAAC;QACxH,IAAI,CAAC,eAAe,GAAG,uBAAkB,CAAC,OAAO,CAAkB,iDAAuB,CAAC,eAAe,CAAC,CAAC;IAChH,CAAC;IAEe,OAAO;;YACnB,IAAI;gBACA,MAAM,IAAI,CAAC,sBAAsB,CAAC,qCAAqC,CAAC,6CAAqB,CAAC,MAAM,CAAC,CAAC;aACzG;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACvB,MAAM,IAAI,6BAAY,CAAC,mDAAmD,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;aACtG;YAED,MAAM,UAAU,GAAG,iBAAY,CAAC,OAAO,CAAqB,qBAAS,CAAC,iBAAiB,CAAC,CAAC,aAAa,EAAE,CAAC;YACzG,MAAM,WAAW,GAAG,MAAM,UAAU,CAAC,WAAW,EAAE,CAAC;YAEnD,IAAI;gBACA,MAAM,IAAI,CAAC,eAAe,CAAC,wBAAwB,CAAC,WAAW,CAAC,CAAC;gBACjE,MAAM,WAAW,CAAC,MAAM,EAAE,CAAC;aAC9B;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,WAAW,CAAC,QAAQ,EAAE,CAAC;gBAE7B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACvB,MAAM,IAAI,6BAAY,CAAC,oDAAoD,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;aACvG;oBAAS;gBACN,MAAM,IAAI,CAAC,mBAAmB,CAAC,cAAc,EAAE,CAAC;aACnD;YAED,MAAM,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC;QAC7C,CAAC;KAAA;CACJ;AAhDD,oEAgDC"}
1
+ {"version":3,"file":"RefreshPrecomputedTablesTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPrecomputedTablesTask.ts"],"names":[],"mappings":";;;AAAA,2CAA0C;AAI1C,wEAA2E;AAC3E,kFAAqF;AACrF,wCAA2D;AAC3D,kFAAqF;AAErF,wEAAqE;AAErE,2EAAkF;AAClF,6EAAwE;AAGxE,MAAa,4BAA6B,SAAQ,2BAAiB;IAW/D,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QAXP,cAAS,GAAG,0BAA0B,CAAC;QACvC,aAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,aAAa;QAWpD,IAAI,CAAC,MAAM,GAAG,uBAAkB,CAAC,O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AAI,CAAC,mBAAmB,CAAC,cAAc,EAAE,CAAC;SACnD;QAED,MAAM,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC;IAC7C,CAAC;CACJ;AAhDD,oEAgDC"}
@@ -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.RefreshPublicGtfsDepartureCacheTask = void 0;
25
16
  const PublicGtfsDepartureRepository_1 = require("../../../data-access/cache/PublicGtfsDepartureRepository");
@@ -48,44 +39,41 @@ let RefreshPublicGtfsDepartureCacheTask = exports.RefreshPublicGtfsDepartureCach
48
39
  const departurePageSize = this.config.getValue("module.pid.ropid-gtfs.timetables.refreshPublicGtfsDepartureCache.departurePageSize", DEFAULT_PAGE_SIZE.toString());
49
40
  this.departurePageSize = Number.parseInt(departurePageSize);
50
41
  }
51
- execute(params) {
52
- return __awaiter(this, void 0, void 0, function* () {
53
- const intervalParams = this.getIntervalParamsWithDefault(params);
54
- const numberOfDepartures = yield this.departureRepository.countDeparturesForPublicCache(intervalParams);
55
- const pages = Math.ceil(numberOfDepartures / this.departurePageSize);
56
- const stopIdsInDepartures = new Set();
57
- for (let page = 0; page < pages; page++) {
58
- const departuresForCache = yield this.departureRepository.getDepaturesForPublicCache(page, this.departurePageSize, intervalParams);
59
- const departuresByStopIdDict = this.getDeparturesByStopId(departuresForCache);
60
- for (const [stopId, departures] of departuresByStopIdDict.entries()) {
61
- stopIdsInDepartures.add(stopId);
62
- try {
63
- const departuresDto = this.departureTransformation.transformArray(departures);
64
- yield this.publicDepartureRepository.replaceDeparturesForStop(departuresDto, stopId, intervalParams);
65
- }
66
- catch (err) {
67
- if (err instanceof golemio_errors_1.AbstractGolemioError) {
68
- throw err;
69
- }
70
- throw new golemio_errors_1.GeneralError("Error while refreshing public departure cache", this.constructor.name, err);
42
+ async execute(params) {
43
+ const intervalParams = this.getIntervalParamsWithDefault(params);
44
+ const numberOfDepartures = await this.departureRepository.countDeparturesForPublicCache(intervalParams);
45
+ const pages = Math.ceil(numberOfDepartures / this.departurePageSize);
46
+ const stopIdsInDepartures = new Set();
47
+ for (let page = 0; page < pages; page++) {
48
+ const departuresForCache = await this.departureRepository.getDepaturesForPublicCache(page, this.departurePageSize, intervalParams);
49
+ const departuresByStopIdDict = this.getDeparturesByStopId(departuresForCache);
50
+ for (const [stopId, departures] of departuresByStopIdDict.entries()) {
51
+ stopIdsInDepartures.add(stopId);
52
+ try {
53
+ const departuresDto = this.departureTransformation.transformArray(departures);
54
+ await this.publicDepartureRepository.replaceDeparturesForStop(departuresDto, stopId, intervalParams);
55
+ }
56
+ catch (err) {
57
+ if (err instanceof golemio_errors_1.AbstractGolemioError) {
58
+ throw err;
71
59
  }
60
+ throw new golemio_errors_1.GeneralError("Error while refreshing public departure cache", this.constructor.name, err);
72
61
  }
73
62
  }
74
- const allStops = yield this.stopsModel.getAll();
75
- for (const { stop_id: id } of allStops) {
76
- if (!stopIdsInDepartures.has(id)) {
77
- yield this.publicDepartureRepository.replaceDeparturesForStop([], id, intervalParams);
78
- }
63
+ }
64
+ const allStops = await this.stopsModel.getAll();
65
+ for (const { stop_id: id } of allStops) {
66
+ if (!stopIdsInDepartures.has(id)) {
67
+ await this.publicDepartureRepository.replaceDeparturesForStop([], id, intervalParams);
79
68
  }
80
- });
69
+ }
81
70
  }
82
71
  getIntervalParamsWithDefault(params) {
83
- var _a, _b;
84
72
  const defaultIntervalFromHours = this.config.getValue("module.pid.ropid-gtfs.timetables.refreshPublicGtfsDepartureCache.defaultIntervalFromHours", "-3");
85
73
  const defaultIntervalToHours = this.config.getValue("module.pid.ropid-gtfs.timetables.refreshPublicGtfsDepartureCache.defaultIntervalToHours", "6");
86
74
  return {
87
- intervalFromHours: (_a = params.intervalFromHours) !== null && _a !== void 0 ? _a : Number.parseInt(defaultIntervalFromHours),
88
- intervalToHours: (_b = params.intervalToHours) !== null && _b !== void 0 ? _b : Number.parseInt(defaultIntervalToHours),
75
+ intervalFromHours: params.intervalFromHours ?? Number.parseInt(defaultIntervalFromHours),
76
+ intervalToHours: params.intervalToHours ?? Number.parseInt(defaultIntervalToHours),
89
77
  };
90
78
  }
91
79
  getDeparturesByStopId(departures) {
@@ -1 +1 @@
1
- {"version":3,"file":"RefreshPublicGtfsDepartureCacheTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPublicGtfsDepartureCacheTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,4GAA+G;AAC/G,kEAA8E;AAE9E,kFAAqF;AACrF,oHAAuH;AAEvH,wEAAqE;AACrE,2EAA6E;AAC7E,6EAA8F;AAC9F,iEAAwE;AACxE,4CAAqD;AAErD,wFAA+F;AAC/F,sEAAyE;AAEzE,MAAM,iBAAiB,GAAG,KAAK,CAAC;AAGzB,IAAM,mCAAmC,iDAAzC,MAAM,mCAAoC,SAAQ,sBAA2C;IAMhG,YAEI,uBAAmE,EACd,mBAAiD,EAEtG,yBAAgE,EAChC,MAA6B,EACR,UAAuC;QAE5F,KAAK,CAAC,iCAAqB,CAAC,CAAC;QAPrB,4BAAuB,GAAvB,uBAAuB,CAAoC;QACN,wBAAmB,GAAnB,mBAAmB,CAAsB;QAE9F,8BAAyB,GAAzB,yBAAyB,CAA+B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UAAU,EAAE;YAChC,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE;gBAC5C,kBAAkB,CAAC,GAAG,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;aACjD;YAED,kBAAkB,CAAC,GAAG,CAAC,SAAS,CAAC,OAAO,CAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SAC9D;QAED,OAAO,kBAAkB,CAAC;IAC9B,CAAC;CACJ,CAAA;8CA1FY,mCAAmC;IAD/C,IAAA,qBAAU,GAAE;IAQJ,WAAA,IAAA,iBAAM,EAAC,iDAAuB,CAAC,kCAAkC,CAAC,CAAA;IAElE,WAAA,IAAA,iBAAM,EAAC,iDAAuB,CAAC,mBAAmB,CAAC,CAAA;IACnD,WAAA,IAAA,iBAAM,EAAC,iDAAuB,CAAC,6BAA6B,CAAC,CAAA;IAE7D,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,YAAY,CAAC,CAAA;IAC9B,WAAA,IAAA,iBAAM,EAAC,iDAAuB,CAAC,mBAAmB,CAAC,CAAA;qCALnB,uEAAkC;QACe,kCAAoB;QAEnE,6DAA6B,UAES,yCAAmB;GAbvF,mCAAmC,CA0F/C"}
1
+ {"version":3,"file":"RefreshPublicGtfsDepartureCacheTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPublicGtfsDepartureCacheTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,4GAA+G;AAC/G,kEAA8E;AAE9E,kFAAqF;AACrF,oHAAuH;AAEvH,wEAAqE;AACrE,2EAA6E;AAC7E,6EAA8F;AAC9F,iEAAwE;AACxE,4CAAqD;AAErD,wFAA+F;AAC/F,sEAAyE;AAEzE,MAAM,iBAAiB,GAAG,KAAK,CAAC;AAGzB,IAAM,mCAAmC,iDAAzC,MAAM,mCAAoC,SAAQ,sBAA2C;IAMhG,YAEI,uBAAmE,EACd,m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