@golemio/pid 4.0.3 → 4.0.4-dev.2004342551

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 (200) hide show
  1. package/README.md +1 -1
  2. package/db/example/redis/gtfsStopsCacheMock.json +8 -0
  3. package/db/example/redis/jisCacheMock.json +31 -0
  4. package/db/migrations/postgresql/20250716143052-add-stop-name-to-combined-stop-times.js +53 -0
  5. package/db/migrations/postgresql/sqls/20250716143052-add-stop-name-to-combined-stop-times-down.sql +47 -0
  6. package/db/migrations/postgresql/sqls/20250716143052-add-stop-name-to-combined-stop-times-up.sql +47 -0
  7. package/dist/helpers/GtfsStopParser.d.ts +2 -0
  8. package/dist/helpers/GtfsStopParser.js +11 -8
  9. package/dist/helpers/GtfsStopParser.js.map +1 -1
  10. package/dist/helpers/jis/JISInfotextSeverityLevelPriority.d.ts +6 -0
  11. package/dist/helpers/jis/JISInfotextSeverityLevelPriority.js +11 -0
  12. package/dist/helpers/jis/JISInfotextSeverityLevelPriority.js.map +1 -0
  13. package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js +0 -1
  14. package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js.map +1 -1
  15. package/dist/integration-engine/jis/ioc/Di.js +10 -0
  16. package/dist/integration-engine/jis/ioc/Di.js.map +1 -1
  17. package/dist/integration-engine/jis/ioc/JISContainerToken.d.ts +4 -0
  18. package/dist/integration-engine/jis/ioc/JISContainerToken.js +5 -0
  19. package/dist/integration-engine/jis/ioc/JISContainerToken.js.map +1 -1
  20. package/dist/integration-engine/jis/repositories/JISInfotextsRedisRepository.d.ts +9 -0
  21. package/dist/integration-engine/jis/repositories/JISInfotextsRedisRepository.js +86 -0
  22. package/dist/integration-engine/jis/repositories/JISInfotextsRedisRepository.js.map +1 -0
  23. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.d.ts +6 -1
  24. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js +50 -2
  25. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js.map +1 -1
  26. package/dist/integration-engine/jis/transformations/JISInfotextCacheTranformation.d.ts +7 -0
  27. package/dist/integration-engine/jis/transformations/JISInfotextCacheTranformation.js +37 -0
  28. package/dist/integration-engine/jis/transformations/JISInfotextCacheTranformation.js.map +1 -0
  29. package/dist/integration-engine/jis/workers/JISWorker.js +1 -0
  30. package/dist/integration-engine/jis/workers/JISWorker.js.map +1 -1
  31. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.d.ts +13 -0
  32. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.js +47 -0
  33. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.js.map +1 -0
  34. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.d.ts +1 -2
  35. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js +5 -4
  36. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js.map +1 -1
  37. package/dist/integration-engine/ropid-gtfs/RopidGTFSCisStopsModel.d.ts +18 -0
  38. package/dist/integration-engine/ropid-gtfs/RopidGTFSCisStopsModel.js +44 -0
  39. package/dist/integration-engine/ropid-gtfs/RopidGTFSCisStopsModel.js.map +1 -0
  40. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.d.ts +5 -1
  41. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js +24 -0
  42. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js.map +1 -1
  43. package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js.map +1 -1
  44. package/dist/integration-engine/ropid-gtfs/index.d.ts +1 -0
  45. package/dist/integration-engine/ropid-gtfs/index.js +1 -0
  46. package/dist/integration-engine/ropid-gtfs/index.js.map +1 -1
  47. package/dist/integration-engine/ropid-gtfs/ioc/Di.js +8 -0
  48. package/dist/integration-engine/ropid-gtfs/ioc/Di.js.map +1 -1
  49. package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.d.ts +3 -0
  50. package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.js +3 -0
  51. package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.js.map +1 -1
  52. package/dist/integration-engine/ropid-gtfs/transformations/RopidDeparturesPresetsTransformation.js +1 -1
  53. package/dist/integration-engine/ropid-gtfs/transformations/RopidDeparturesPresetsTransformation.js.map +1 -1
  54. package/dist/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.js +1 -0
  55. package/dist/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.js.map +1 -1
  56. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js +8 -5
  57. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js.map +1 -1
  58. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshGtfsStopsCacheTask.d.ts +12 -0
  59. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshGtfsStopsCacheTask.js +44 -0
  60. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshGtfsStopsCacheTask.js.map +1 -0
  61. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.d.ts +12 -0
  62. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.js +87 -0
  63. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.js.map +1 -0
  64. package/dist/integration-engine/vehicle-positions/ioc/VPContainerToken.d.ts +1 -0
  65. package/dist/integration-engine/vehicle-positions/ioc/VPContainerToken.js +1 -0
  66. package/dist/integration-engine/vehicle-positions/ioc/VPContainerToken.js.map +1 -1
  67. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js +1 -0
  68. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js.map +1 -1
  69. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/interfaces/TripRepositoryInterfaces.d.ts +2 -1
  70. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.d.ts +3 -1
  71. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js +124 -109
  72. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js.map +1 -1
  73. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.d.ts +3 -1
  74. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js +100 -85
  75. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js.map +1 -1
  76. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js.map +1 -1
  77. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js +1 -0
  78. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js.map +1 -1
  79. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js +2 -0
  80. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js.map +1 -1
  81. package/dist/output-gateway/index.js +1 -0
  82. package/dist/output-gateway/index.js.map +1 -1
  83. package/dist/output-gateway/jis/data-access/cache/JISInfotextsRedisRepository.d.ts +17 -0
  84. package/dist/output-gateway/jis/data-access/cache/JISInfotextsRedisRepository.js +113 -0
  85. package/dist/output-gateway/jis/data-access/cache/JISInfotextsRedisRepository.js.map +1 -0
  86. package/dist/output-gateway/jis/ioc/Di.js +2 -2
  87. package/dist/output-gateway/jis/ioc/Di.js.map +1 -1
  88. package/dist/output-gateway/jis/ioc/OgJisToken.d.ts +2 -0
  89. package/dist/output-gateway/jis/ioc/OgJisToken.js +2 -0
  90. package/dist/output-gateway/jis/ioc/OgJisToken.js.map +1 -1
  91. package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js.map +1 -1
  92. package/dist/output-gateway/pid/controllers/v4/V4TransferBoardsController.d.ts +17 -0
  93. package/dist/output-gateway/pid/controllers/v4/V4TransferBoardsController.js +155 -0
  94. package/dist/output-gateway/pid/controllers/v4/V4TransferBoardsController.js.map +1 -0
  95. package/dist/output-gateway/pid/controllers/v4/interfaces/ITransferBoardsParams.d.ts +14 -0
  96. package/dist/output-gateway/pid/controllers/v4/interfaces/ITransferBoardsParams.js +3 -0
  97. package/dist/output-gateway/pid/controllers/v4/interfaces/ITransferBoardsParams.js.map +1 -0
  98. package/dist/output-gateway/pid/domain/InfotextInterfaces.d.ts +5 -0
  99. package/dist/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.d.ts +4 -1
  100. package/dist/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.js +7 -1
  101. package/dist/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.js.map +1 -1
  102. package/dist/output-gateway/pid/helpers/TransferBoardFilter.d.ts +5 -0
  103. package/dist/output-gateway/pid/helpers/TransferBoardFilter.js +33 -0
  104. package/dist/output-gateway/pid/helpers/TransferBoardFilter.js.map +1 -0
  105. package/dist/output-gateway/pid/helpers/TransferBoardSorter.d.ts +6 -0
  106. package/dist/output-gateway/pid/helpers/TransferBoardSorter.js +61 -0
  107. package/dist/output-gateway/pid/helpers/TransferBoardSorter.js.map +1 -0
  108. package/dist/output-gateway/pid/index.d.ts +50 -0
  109. package/dist/output-gateway/pid/index.js.map +1 -1
  110. package/dist/output-gateway/pid/ioc/Di.js +64 -6
  111. package/dist/output-gateway/pid/ioc/Di.js.map +1 -1
  112. package/dist/output-gateway/pid/ioc/OgPidToken.d.ts +12 -0
  113. package/dist/output-gateway/pid/ioc/OgPidToken.js +12 -0
  114. package/dist/output-gateway/pid/ioc/OgPidToken.js.map +1 -1
  115. package/dist/output-gateway/pid/routers/index.d.ts +1 -0
  116. package/dist/output-gateway/pid/routers/index.js +3 -1
  117. package/dist/output-gateway/pid/routers/index.js.map +1 -1
  118. package/dist/output-gateway/pid/routers/v4/V4PIDRouter.d.ts +16 -0
  119. package/dist/output-gateway/pid/routers/v4/V4PIDRouter.js +67 -0
  120. package/dist/output-gateway/pid/routers/v4/V4PIDRouter.js.map +1 -0
  121. package/dist/output-gateway/pid/service/facade/InfotextFacade.d.ts +7 -2
  122. package/dist/output-gateway/pid/service/facade/InfotextFacade.js +29 -4
  123. package/dist/output-gateway/pid/service/facade/InfotextFacade.js.map +1 -1
  124. package/dist/output-gateway/pid/service/facade/StopFacade.d.ts +12 -3
  125. package/dist/output-gateway/pid/service/facade/StopFacade.js +43 -7
  126. package/dist/output-gateway/pid/service/facade/StopFacade.js.map +1 -1
  127. package/dist/output-gateway/pid/service/facade/TransferFacade.d.ts +17 -10
  128. package/dist/output-gateway/pid/service/facade/TransferFacade.js +161 -16
  129. package/dist/output-gateway/pid/service/facade/TransferFacade.js.map +1 -1
  130. package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.d.ts +7 -1
  131. package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.js +9 -0
  132. package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.js.map +1 -1
  133. package/dist/output-gateway/pid/service/transformations/JISInfotextCacheTransferTransformation.d.ts +13 -0
  134. package/dist/output-gateway/pid/service/transformations/JISInfotextCacheTransferTransformation.js +31 -0
  135. package/dist/output-gateway/pid/service/transformations/JISInfotextCacheTransferTransformation.js.map +1 -0
  136. package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.d.ts +27 -0
  137. package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.js +77 -0
  138. package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.js.map +1 -0
  139. package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.d.ts +1 -1
  140. package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js +7 -4
  141. package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js.map +1 -1
  142. package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.d.ts +1 -0
  143. package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.js +21 -0
  144. package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.js.map +1 -1
  145. package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.d.ts +2 -1
  146. package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js +14 -15
  147. package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js.map +1 -1
  148. package/dist/output-gateway/public/domain/repository/IGtfsDepartureRepository.d.ts +1 -1
  149. package/dist/output-gateway/public/ioc/Di.js +1 -1
  150. package/dist/output-gateway/public/ioc/Di.js.map +1 -1
  151. package/dist/output-gateway/ropid-gtfs/data-access/redis/GtfsStopsRedisRepository.d.ts +13 -0
  152. package/dist/output-gateway/ropid-gtfs/data-access/redis/GtfsStopsRedisRepository.js +83 -0
  153. package/dist/output-gateway/ropid-gtfs/data-access/redis/GtfsStopsRedisRepository.js.map +1 -0
  154. package/dist/output-gateway/shared/constants/route-version.d.ts +2 -1
  155. package/dist/output-gateway/shared/constants/route-version.js +1 -0
  156. package/dist/output-gateway/shared/constants/route-version.js.map +1 -1
  157. package/dist/output-gateway/{public → shared}/service/VPSubscriber.d.ts +4 -2
  158. package/dist/output-gateway/{public → shared}/service/VPSubscriber.js +1 -1
  159. package/dist/output-gateway/shared/service/VPSubscriber.js.map +1 -0
  160. package/dist/schema-definitions/jis/redis/const.d.ts +1 -0
  161. package/dist/schema-definitions/jis/redis/const.js +2 -1
  162. package/dist/schema-definitions/jis/redis/const.js.map +1 -1
  163. package/dist/schema-definitions/jis/redis/interfaces/IJISInfotextDto.d.ts +17 -0
  164. package/dist/schema-definitions/jis/redis/interfaces/IJISInfotextDto.js +3 -0
  165. package/dist/schema-definitions/jis/redis/interfaces/IJISInfotextDto.js.map +1 -0
  166. package/dist/schema-definitions/jis/redis/schemas/JISInfotextDtoSchema.d.ts +3 -0
  167. package/dist/schema-definitions/jis/redis/schemas/JISInfotextDtoSchema.js +59 -0
  168. package/dist/schema-definitions/jis/redis/schemas/JISInfotextDtoSchema.js.map +1 -0
  169. package/dist/schema-definitions/ropid-departures-presets/index.d.ts +1 -0
  170. package/dist/schema-definitions/ropid-departures-presets/index.js +3 -0
  171. package/dist/schema-definitions/ropid-departures-presets/index.js.map +1 -1
  172. package/dist/schema-definitions/ropid-gtfs/interfaces/IStopCisDto.d.ts +16 -0
  173. package/dist/schema-definitions/ropid-gtfs/interfaces/IStopCisDto.js +3 -0
  174. package/dist/schema-definitions/ropid-gtfs/interfaces/IStopCisDto.js.map +1 -0
  175. package/dist/schema-definitions/ropid-gtfs/interfaces/IStopDto.d.ts +1 -0
  176. package/dist/schema-definitions/ropid-gtfs/models/StopCisDto.d.ts +58 -0
  177. package/dist/schema-definitions/ropid-gtfs/models/StopCisDto.js +69 -0
  178. package/dist/schema-definitions/ropid-gtfs/models/StopCisDto.js.map +1 -0
  179. package/dist/schema-definitions/ropid-gtfs/redis/const.d.ts +1 -0
  180. package/dist/schema-definitions/ropid-gtfs/redis/const.js +2 -1
  181. package/dist/schema-definitions/ropid-gtfs/redis/const.js.map +1 -1
  182. package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.d.ts +3 -2
  183. package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.js +4 -0
  184. package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.js.map +1 -1
  185. package/dist/schema-definitions/vehicle-positions/models/views/interfaces/IPublicStopTimeDto.d.ts +1 -0
  186. package/dist/schema-definitions/vehicle-positions/redis/interfaces/IPublicApiCacheDto.d.ts +2 -0
  187. package/dist/schema-definitions/vehicle-positions/redis/interfaces/IPublicStopTimeCacheDto.d.ts +1 -0
  188. package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicApiCacheDtoSchema.js +8 -0
  189. package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicApiCacheDtoSchema.js.map +1 -1
  190. package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicStopTimeCacheDtoSchema.js +4 -1
  191. package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicStopTimeCacheDtoSchema.js.map +1 -1
  192. package/docs/assets/V4Transferboards.svg +4 -0
  193. package/docs/assets/V4transferboards.drawio +191 -0
  194. package/docs/asyncapi.yaml +45 -0
  195. package/docs/cache/types/redis.md +81 -2
  196. package/docs/jis/index.md +15 -5
  197. package/docs/openapi-input.yaml +13 -2
  198. package/docs/openapi-output.yaml +326 -4
  199. package/package.json +2 -2
  200. package/dist/output-gateway/public/service/VPSubscriber.js.map +0 -1
@@ -0,0 +1,191 @@
1
+ <mxfile host="Electron" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/28.0.6 Chrome/138.0.7204.100 Electron/37.2.3 Safari/537.36" version="28.0.6">
2
+ <diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">
3
+ <mxGraphModel dx="1528" dy="503" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
4
+ <root>
5
+ <mxCell id="WIyWlLk6GJQsqaUBKTNV-0" />
6
+ <mxCell id="WIyWlLk6GJQsqaUBKTNV-1" parent="WIyWlLk6GJQsqaUBKTNV-0" />
7
+ <mxCell id="TFaf3FyTcIUIAYAIC652-1" value="Redis channel vpPublicCache" style="whiteSpace=wrap;strokeWidth=2;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
8
+ <mxGeometry x="-280" y="80" width="260" height="80" as="geometry" />
9
+ </mxCell>
10
+ <mxCell id="TFaf3FyTcIUIAYAIC652-28" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;curved=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="TFaf3FyTcIUIAYAIC652-2" target="TFaf3FyTcIUIAYAIC652-6">
11
+ <mxGeometry relative="1" as="geometry">
12
+ <Array as="points">
13
+ <mxPoint x="-150" y="420" />
14
+ <mxPoint x="170" y="420" />
15
+ </Array>
16
+ </mxGeometry>
17
+ </mxCell>
18
+ <mxCell id="TFaf3FyTcIUIAYAIC652-2" value="VPSubscriber" style="whiteSpace=wrap;strokeWidth=2;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
19
+ <mxGeometry x="-230" y="310" width="150" height="50" as="geometry" />
20
+ </mxCell>
21
+ <mxCell id="TFaf3FyTcIUIAYAIC652-4" value="Redis vpPublicCache:* (aktivní, budoucí a zrušené spoje)" style="shape=cylinder3;boundedLbl=1;backgroundOutline=1;size=10;strokeWidth=2;whiteSpace=wrap;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
22
+ <mxGeometry x="-120" y="770" width="310" height="80" as="geometry" />
23
+ </mxCell>
24
+ <mxCell id="TFaf3FyTcIUIAYAIC652-5" value="Redis gtfsPublicDepartureCache:*" style="shape=cylinder3;boundedLbl=1;backgroundOutline=1;size=10;strokeWidth=2;whiteSpace=wrap;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
25
+ <mxGeometry x="590" y="770" width="220" height="80" as="geometry" />
26
+ </mxCell>
27
+ <mxCell id="TFaf3FyTcIUIAYAIC652-33" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;curved=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="TFaf3FyTcIUIAYAIC652-6" target="TFaf3FyTcIUIAYAIC652-4">
28
+ <mxGeometry relative="1" as="geometry" />
29
+ </mxCell>
30
+ <mxCell id="TFaf3FyTcIUIAYAIC652-6" value="OG PublicVehiclePositionsRepository" style="whiteSpace=wrap;strokeWidth=2;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
31
+ <mxGeometry x="60" y="530" width="230" height="80" as="geometry" />
32
+ </mxCell>
33
+ <mxCell id="TFaf3FyTcIUIAYAIC652-55" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="TFaf3FyTcIUIAYAIC652-7" target="TFaf3FyTcIUIAYAIC652-46">
34
+ <mxGeometry relative="1" as="geometry" />
35
+ </mxCell>
36
+ <mxCell id="TFaf3FyTcIUIAYAIC652-7" value="GET /v4/pid/transferboards" style="whiteSpace=wrap;strokeWidth=2;fontStyle=1" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
37
+ <mxGeometry x="250" y="80" width="260" height="80" as="geometry" />
38
+ </mxCell>
39
+ <mxCell id="TFaf3FyTcIUIAYAIC652-50" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;curved=1;startArrow=classic;startFill=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="TFaf3FyTcIUIAYAIC652-8" target="TFaf3FyTcIUIAYAIC652-40">
40
+ <mxGeometry relative="1" as="geometry" />
41
+ </mxCell>
42
+ <mxCell id="TFaf3FyTcIUIAYAIC652-51" value="RT informace o zastavce" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="TFaf3FyTcIUIAYAIC652-50">
43
+ <mxGeometry relative="1" as="geometry">
44
+ <mxPoint x="5" y="1" as="offset" />
45
+ </mxGeometry>
46
+ </mxCell>
47
+ <mxCell id="TFaf3FyTcIUIAYAIC652-61" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.75;entryY=0;entryDx=0;entryDy=0;curved=1;startArrow=classic;startFill=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="TFaf3FyTcIUIAYAIC652-8" target="TFaf3FyTcIUIAYAIC652-6">
48
+ <mxGeometry relative="1" as="geometry" />
49
+ </mxCell>
50
+ <mxCell id="TFaf3FyTcIUIAYAIC652-71" value="RT informace o spoji" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="TFaf3FyTcIUIAYAIC652-61">
51
+ <mxGeometry y="10" relative="1" as="geometry">
52
+ <mxPoint x="2" y="15" as="offset" />
53
+ </mxGeometry>
54
+ </mxCell>
55
+ <mxCell id="TFaf3FyTcIUIAYAIC652-8" value="Obohacení o RT informace" style="whiteSpace=wrap;strokeWidth=2;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
56
+ <mxGeometry x="390" y="420" width="190" height="50" as="geometry" />
57
+ </mxCell>
58
+ <mxCell id="TFaf3FyTcIUIAYAIC652-9" value="Přihlášení k odběru" style="curved=1;startArrow=none;endArrow=block;exitX=0.64;exitY=-0.01;entryX=0.64;entryY=1;rounded=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="TFaf3FyTcIUIAYAIC652-2" target="TFaf3FyTcIUIAYAIC652-1">
59
+ <mxGeometry relative="1" as="geometry">
60
+ <Array as="points">
61
+ <mxPoint x="-50" y="220" />
62
+ </Array>
63
+ </mxGeometry>
64
+ </mxCell>
65
+ <mxCell id="TFaf3FyTcIUIAYAIC652-10" value="ID/název nové datové sady" style="curved=1;startArrow=none;endArrow=block;exitX=0.36;exitY=1;entryX=0.36;entryY=-0.01;rounded=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="TFaf3FyTcIUIAYAIC652-1" target="TFaf3FyTcIUIAYAIC652-2">
66
+ <mxGeometry relative="1" as="geometry">
67
+ <Array as="points">
68
+ <mxPoint x="-240" y="220" />
69
+ </Array>
70
+ </mxGeometry>
71
+ </mxCell>
72
+ <mxCell id="TFaf3FyTcIUIAYAIC652-19" value="Redis channel jisCache" style="whiteSpace=wrap;strokeWidth=2;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
73
+ <mxGeometry x="-570" y="80" width="260" height="80" as="geometry" />
74
+ </mxCell>
75
+ <mxCell id="TFaf3FyTcIUIAYAIC652-29" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;curved=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="TFaf3FyTcIUIAYAIC652-20" target="TFaf3FyTcIUIAYAIC652-27">
76
+ <mxGeometry relative="1" as="geometry">
77
+ <Array as="points">
78
+ <mxPoint x="-440" y="470" />
79
+ <mxPoint x="-90" y="470" />
80
+ </Array>
81
+ </mxGeometry>
82
+ </mxCell>
83
+ <mxCell id="TFaf3FyTcIUIAYAIC652-20" value="VPSubscriber" style="whiteSpace=wrap;strokeWidth=2;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
84
+ <mxGeometry x="-520" y="310" width="150" height="50" as="geometry" />
85
+ </mxCell>
86
+ <mxCell id="TFaf3FyTcIUIAYAIC652-21" value="Přihlášení k odběru" style="curved=1;startArrow=none;endArrow=block;exitX=0.64;exitY=-0.01;entryX=0.64;entryY=1;rounded=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="TFaf3FyTcIUIAYAIC652-20" target="TFaf3FyTcIUIAYAIC652-19">
87
+ <mxGeometry relative="1" as="geometry">
88
+ <Array as="points">
89
+ <mxPoint x="-340" y="220" />
90
+ </Array>
91
+ </mxGeometry>
92
+ </mxCell>
93
+ <mxCell id="TFaf3FyTcIUIAYAIC652-22" value="ID/název nové datové sady" style="curved=1;startArrow=none;endArrow=block;exitX=0.36;exitY=1;entryX=0.36;entryY=-0.01;rounded=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="TFaf3FyTcIUIAYAIC652-19" target="TFaf3FyTcIUIAYAIC652-20">
94
+ <mxGeometry relative="1" as="geometry">
95
+ <Array as="points">
96
+ <mxPoint x="-530" y="220" />
97
+ </Array>
98
+ </mxGeometry>
99
+ </mxCell>
100
+ <mxCell id="TFaf3FyTcIUIAYAIC652-23" value="Redis channel gtfsStopsCache" style="whiteSpace=wrap;strokeWidth=2;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
101
+ <mxGeometry x="859" y="80" width="260" height="80" as="geometry" />
102
+ </mxCell>
103
+ <mxCell id="TFaf3FyTcIUIAYAIC652-32" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="TFaf3FyTcIUIAYAIC652-24" target="TFaf3FyTcIUIAYAIC652-31">
104
+ <mxGeometry relative="1" as="geometry" />
105
+ </mxCell>
106
+ <mxCell id="TFaf3FyTcIUIAYAIC652-24" value="VPSubscriber" style="whiteSpace=wrap;strokeWidth=2;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
107
+ <mxGeometry x="909" y="310" width="150" height="50" as="geometry" />
108
+ </mxCell>
109
+ <mxCell id="TFaf3FyTcIUIAYAIC652-25" value="Přihlášení k odběru" style="curved=1;startArrow=none;endArrow=block;exitX=0.64;exitY=-0.01;entryX=0.64;entryY=1;rounded=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="TFaf3FyTcIUIAYAIC652-24" target="TFaf3FyTcIUIAYAIC652-23">
110
+ <mxGeometry relative="1" as="geometry">
111
+ <Array as="points">
112
+ <mxPoint x="1089" y="220" />
113
+ </Array>
114
+ </mxGeometry>
115
+ </mxCell>
116
+ <mxCell id="TFaf3FyTcIUIAYAIC652-26" value="ID/název nové datové sady" style="curved=1;startArrow=none;endArrow=block;exitX=0.36;exitY=1;entryX=0.36;entryY=-0.01;rounded=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="TFaf3FyTcIUIAYAIC652-23" target="TFaf3FyTcIUIAYAIC652-24">
117
+ <mxGeometry relative="1" as="geometry">
118
+ <Array as="points">
119
+ <mxPoint x="899" y="220" />
120
+ </Array>
121
+ </mxGeometry>
122
+ </mxCell>
123
+ <mxCell id="TFaf3FyTcIUIAYAIC652-37" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;curved=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="TFaf3FyTcIUIAYAIC652-27" target="TFaf3FyTcIUIAYAIC652-34">
124
+ <mxGeometry relative="1" as="geometry" />
125
+ </mxCell>
126
+ <mxCell id="TFaf3FyTcIUIAYAIC652-27" value="OG JISInfotextsRedisRepository" style="whiteSpace=wrap;strokeWidth=2;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
127
+ <mxGeometry x="-190" y="530" width="210" height="80" as="geometry" />
128
+ </mxCell>
129
+ <mxCell id="TFaf3FyTcIUIAYAIC652-36" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="TFaf3FyTcIUIAYAIC652-31" target="TFaf3FyTcIUIAYAIC652-35">
130
+ <mxGeometry relative="1" as="geometry" />
131
+ </mxCell>
132
+ <mxCell id="TFaf3FyTcIUIAYAIC652-31" value="OG GtfsStopsRedisRepository" style="whiteSpace=wrap;strokeWidth=2;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
133
+ <mxGeometry x="880" y="500" width="210" height="80" as="geometry" />
134
+ </mxCell>
135
+ <mxCell id="TFaf3FyTcIUIAYAIC652-34" value="Redis jisCache:* (aktivní infotexty)" style="shape=cylinder3;boundedLbl=1;backgroundOutline=1;size=10;strokeWidth=2;whiteSpace=wrap;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
136
+ <mxGeometry x="-390" y="770" width="240" height="80" as="geometry" />
137
+ </mxCell>
138
+ <mxCell id="TFaf3FyTcIUIAYAIC652-35" value="Redis gtfsStopsCache:*" style="shape=cylinder3;boundedLbl=1;backgroundOutline=1;size=10;strokeWidth=2;whiteSpace=wrap;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
139
+ <mxGeometry x="865" y="770" width="240" height="80" as="geometry" />
140
+ </mxCell>
141
+ <mxCell id="TFaf3FyTcIUIAYAIC652-38" value="Redis vpPublicStopTimeCache:* (pro dolneni RT dat o stop_name a platform_code)" style="shape=cylinder3;boundedLbl=1;backgroundOutline=1;size=10;strokeWidth=2;whiteSpace=wrap;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
142
+ <mxGeometry x="260" y="770" width="310" height="80" as="geometry" />
143
+ </mxCell>
144
+ <mxCell id="TFaf3FyTcIUIAYAIC652-42" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;curved=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="TFaf3FyTcIUIAYAIC652-40" target="TFaf3FyTcIUIAYAIC652-38">
145
+ <mxGeometry relative="1" as="geometry" />
146
+ </mxCell>
147
+ <mxCell id="TFaf3FyTcIUIAYAIC652-40" value="OG PublicStopTimeRepository" style="whiteSpace=wrap;strokeWidth=2;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
148
+ <mxGeometry x="370" y="590" width="230" height="80" as="geometry" />
149
+ </mxCell>
150
+ <mxCell id="TFaf3FyTcIUIAYAIC652-53" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;curved=1;startArrow=classic;startFill=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="TFaf3FyTcIUIAYAIC652-46" target="TFaf3FyTcIUIAYAIC652-31">
151
+ <mxGeometry relative="1" as="geometry">
152
+ <Array as="points">
153
+ <mxPoint x="810" y="230" />
154
+ <mxPoint x="810" y="540" />
155
+ </Array>
156
+ </mxGeometry>
157
+ </mxCell>
158
+ <mxCell id="TFaf3FyTcIUIAYAIC652-58" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;curved=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="TFaf3FyTcIUIAYAIC652-46" target="TFaf3FyTcIUIAYAIC652-57">
159
+ <mxGeometry relative="1" as="geometry" />
160
+ </mxCell>
161
+ <mxCell id="TFaf3FyTcIUIAYAIC652-63" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;curved=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="TFaf3FyTcIUIAYAIC652-46" target="TFaf3FyTcIUIAYAIC652-62">
162
+ <mxGeometry relative="1" as="geometry" />
163
+ </mxCell>
164
+ <mxCell id="TFaf3FyTcIUIAYAIC652-46" value="Ziskat vsechny zastavky v danem uzlu" style="whiteSpace=wrap;strokeWidth=2;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
165
+ <mxGeometry x="240" y="200" width="290" height="60" as="geometry" />
166
+ </mxCell>
167
+ <mxCell id="TFaf3FyTcIUIAYAIC652-59" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="TFaf3FyTcIUIAYAIC652-57" target="TFaf3FyTcIUIAYAIC652-8">
168
+ <mxGeometry relative="1" as="geometry" />
169
+ </mxCell>
170
+ <mxCell id="TFaf3FyTcIUIAYAIC652-70" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;curved=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;endArrow=classic;endFill=1;startArrow=classic;startFill=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="TFaf3FyTcIUIAYAIC652-57" target="TFaf3FyTcIUIAYAIC652-65">
171
+ <mxGeometry relative="1" as="geometry" />
172
+ </mxCell>
173
+ <mxCell id="TFaf3FyTcIUIAYAIC652-57" value="Ziskat vsechny odjezdy pro zastavky v uzlu" style="whiteSpace=wrap;strokeWidth=2;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
174
+ <mxGeometry x="340" y="310" width="290" height="60" as="geometry" />
175
+ </mxCell>
176
+ <mxCell id="TFaf3FyTcIUIAYAIC652-64" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;curved=1;startArrow=classic;startFill=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="TFaf3FyTcIUIAYAIC652-62" target="TFaf3FyTcIUIAYAIC652-27">
177
+ <mxGeometry relative="1" as="geometry" />
178
+ </mxCell>
179
+ <mxCell id="TFaf3FyTcIUIAYAIC652-62" value="Ziskat aktivni infotexty pro zastavky v uzlu" style="whiteSpace=wrap;strokeWidth=2;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
180
+ <mxGeometry x="20" y="310" width="290" height="60" as="geometry" />
181
+ </mxCell>
182
+ <mxCell id="TFaf3FyTcIUIAYAIC652-69" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;curved=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="TFaf3FyTcIUIAYAIC652-65" target="TFaf3FyTcIUIAYAIC652-5">
183
+ <mxGeometry relative="1" as="geometry" />
184
+ </mxCell>
185
+ <mxCell id="TFaf3FyTcIUIAYAIC652-65" value="OG PublicGtfsDepartureRepository" style="whiteSpace=wrap;strokeWidth=2;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
186
+ <mxGeometry x="600" y="450" width="200" height="50" as="geometry" />
187
+ </mxCell>
188
+ </root>
189
+ </mxGraphModel>
190
+ </diagram>
191
+ </mxfile>
@@ -48,6 +48,39 @@ channels:
48
48
  messages:
49
49
  empty:
50
50
  $ref: "#/components/messages/JISInfotexts"
51
+ jis.refreshJISInfotextsCache:
52
+ address: vehicle-positions.jis.refreshJISInfotextsCache
53
+ description: Refresh JIS infotexts cache in Redis (Valkey)
54
+ bindings:
55
+ amqp:
56
+ is: queue
57
+ queue:
58
+ durable: true
59
+ messages:
60
+ empty:
61
+ $ref: "#/components/messages/emptyMessage"
62
+ ropidgtfs.refreshPublicGtfsDepartureCache:
63
+ address: vehicle-positions.ropidgtfs.refreshPublicGtfsDepartureCache
64
+ description: Refresh PublicGtfsDepartureCache
65
+ bindings:
66
+ amqp:
67
+ is: queue
68
+ queue:
69
+ durable: true
70
+ messages:
71
+ empty:
72
+ $ref: "#/components/messages/emptyMessage"
73
+ ropidgtfs.refreshGtfsStopsCache:
74
+ address: vehicle-positions.ropidgtfs.refreshGtfsStopsCache
75
+ description: Refresh GtfsStopsCache
76
+ bindings:
77
+ amqp:
78
+ is: queue
79
+ queue:
80
+ durable: true
81
+ messages:
82
+ empty:
83
+ $ref: "#/components/messages/emptyMessage"
51
84
  updateGTFSTripId:
52
85
  address: vehicle-positions.vehiclepositions.updateGTFSTripId
53
86
  description: some description
@@ -294,6 +327,18 @@ operations:
294
327
  action: "send"
295
328
  channel:
296
329
  $ref: "#/channels/jis.refreshJISInfotexts"
330
+ jis.refreshJISInfotextsCache:
331
+ action: "send"
332
+ channel:
333
+ $ref: "#/channels/jis.refreshJISInfotextsCache"
334
+ ropidgtfs.refreshPublicGtfsDepartureCache:
335
+ action: "send"
336
+ channel:
337
+ $ref: "#/channels/ropidgtfs.refreshPublicGtfsDepartureCache"
338
+ ropidgtfs.refreshGtfsStopsCache:
339
+ action: "send"
340
+ channel:
341
+ $ref: "#/channels/ropidgtfs.refreshGtfsStopsCache"
297
342
  updateGTFSTripId:
298
343
  action: "send"
299
344
  channel:
@@ -62,7 +62,7 @@ flowchart TD;
62
62
  - Pomocný timestamp se načte pomocí `GET` a vrátí se jako hodnota hlavičky `Last-Modified` převedená na ISO string. Pokud timestamp neexistuje, hodnota hlavičky bude unix timestamp 0 jako ISO string. Využívá se především pro monitoring a alerting
63
63
  - Feedy se generují nejméně 3x za minutu (rabín 2x) pomocí queue-message
64
64
  - Používají redis-mutex na zamykání, aby neběželo více shodných tasků v jeden okamžik
65
- - Pokud generování stíhá běžet rychleji, task se snaží do ±7 vteřin svého běhu spustit nové generování souborů (opět přes queue-message).
65
+ - Pokud generování stíhá běžet rychleji, task se snaží do ±7 vteřin svého běhu spustit nové generování souborů (opět přes queue-message).
66
66
 
67
67
  ### Flowchart
68
68
 
@@ -152,6 +152,7 @@ flowchart TD;
152
152
  - `cis_stop_platform_code` - nástupiště/kolej podle CIS u vlakových zastávek, jinde null
153
153
  - `platform_code` - označení zastávky podle GTFS
154
154
  - `stop_id` - GTFS id zastávky
155
+ - `stop_name` - název zastávky
155
156
  - TTL 1 hodina a 5 minut
156
157
  - Automatické promazání dat po úspěšném načtení GTFS jíždních řádů
157
158
  - Cca jednou za 5 vteřin se přenačtou stop times pro všechny aktivní spoje. Generování může běžet pouze jednou, po dokončení tasku se spustí znovu (max čekání 4.8 vteřin)
@@ -313,4 +314,82 @@ flowchart TD;
313
314
  rt_info["Obohacení o RT informace"];
314
315
  get_departures--"Alespoň jedno vozidlo připadá nějakému spoji (aktivní, budoucí i zrušené) na odjezdu"-->rt_info;
315
316
  rt_info--"RT informace o spoji"-->redis_repository<-->redis_public_cache;
316
- ```
317
+ ```
318
+
319
+ ## Cache pro API přestupních tabulí (transfer boards)
320
+
321
+ *(přestupní tabule využívají také cache pro Public API, která je již popsána výše)*
322
+
323
+ ### gtfsStopsCache:*
324
+
325
+ - Jednotlivé komponenty cache jsou členěny do sad s `$setId`
326
+ - `$setId` je id vygenerované datové sady (4 náhodné bajty reprezentované hexadecimálně)
327
+ - Nová sada je vytvořena při každém přenačtení cache
328
+ - Id `$setId` nejnovější datové sady se propaguje přes PubSub channel `gtfsStopsCache` a je také uloženo v cache jako hodnota položky `gtfsStopsCache:activeSetName`
329
+ - Komponenty:
330
+ - `gtfsStopsCache:$setId:aswNodeToGtfsStops` - Hash mapa, mapující daný ASW node na seznam pod něj spadajících zastávek (GTFS ids zastávek, odděleny čárkami)
331
+ - `gtfsStopsCache:$setId:cisToAswNode` - Hash mapa, mapující dané CIS id zastávky na příslušný ASW node
332
+ - TTL žádné (mimo přenačtení cache, kdy je namísto okamžitého promazání původnímu setu nastaveno TTL 1 minuta)
333
+ - Cache je celá přenačtena vždy po přenačtení jízdních řádů (tedy 1-2x denně při stavu k červenci 2025)
334
+
335
+ ### jisCache:*
336
+
337
+ - Jednotlivé komponenty cache jsou členěny do sad s `$setId`
338
+ - `$setId` je id vygenerované datové sady (4 náhodné bajty reprezentované hexadecimálně)
339
+ - Nová sada je vytvořena při každém přenačtení cache
340
+ - Id `$setId` nejnovější datové sady se propaguje přes PubSub channel `jisCache` a je také uloženo v cache jako hodnota položky `jisCache:activeSetName`
341
+ - Komponenty:
342
+ - `jisCache:$setId:infotexts` - Hash mapa, mapující dané id infotextu na informace o onom infotextu (JSON jako string)
343
+ - `jisCache:$setId:stops-infotexts` - Hash mapa, mapující dané GTFS id zástavky na seznam infotextů s ní asociovaných (ids infotextů, odděleny čárkami)
344
+ - TTL žádné (mimo přenačtení cache, kdy je namísto okamžitého promazání původnímu setu nastaveno TTL 1 minuta)
345
+ - Cache je celá přenačtena při každé aktualizaci infotextů (tento proces je více popsán v [Dokumentaci propisu VYMI (JIS) dat do datové platformy](../../jis/index.md))
346
+
347
+ ### Flowchart (refresh gtfsStopsCache:*)
348
+
349
+ ```mermaid
350
+ flowchart LR
351
+ finish_up_gtfs("`Dokončení zpracování GTFS JŘ`");
352
+
353
+ psql_ropidgtfs_cis_stops[("`PSQL ropidgtfs_cis_stops`")];
354
+ psql_ropidgtfs_stops[("`PSQL ropidgtfs_stops`")];
355
+
356
+ redis_gtfsStopsCache[("`Redis gtfsStopsCache:\*`")];
357
+
358
+ amqp_refreshGtfsStopsCache["`AMQP refreshGtfsStopsCache`"];
359
+
360
+ task_RefreshGtfsStopsCacheTask["`RefreshGtfsStopsCacheTask`"];
361
+
362
+ finish_up_gtfs --> amqp_refreshGtfsStopsCache;
363
+ amqp_refreshGtfsStopsCache --> task_RefreshGtfsStopsCacheTask;
364
+ task_RefreshGtfsStopsCacheTask <-- "`ASW ids a CIS ids zastávek`" --> psql_ropidgtfs_cis_stops;
365
+ task_RefreshGtfsStopsCacheTask <-- "`ASW nodes a GTFS ids zastávek`" --> psql_ropidgtfs_stops;
366
+ task_RefreshGtfsStopsCacheTask -- "`HSET gtfsStopsCache:$setId:aswNodeToGtfsStops a gtfsStopsCache:$setId:cisToAswNode, EXPIRE staré sady`" --> redis_gtfsStopsCache;
367
+ ```
368
+
369
+ ### Flowchart (refresh jisCache:*)
370
+
371
+ ```mermaid
372
+ flowchart LR
373
+ refresh_infotexts("`Aktualizace infotextů`");
374
+
375
+ psql_jis_infotexts[("`PSQL jis_infotexts`")];
376
+ psql_jis_infotexts_ropidgtfs_stops[("`PSQL jis_infotexts_ropidgtfs_stops`")];
377
+
378
+ redis_jisCache[("`Redis jisCache:\*`")];
379
+
380
+ amqp_refreshJISInfotextsCache["`AMQP refreshJISInfotextsCache`"];
381
+
382
+ task_RefreshJISInfotextsCacheTask["`RefreshJISInfotextsCacheTask`"];
383
+
384
+ refresh_infotexts --> amqp_refreshJISInfotextsCache;
385
+ amqp_refreshJISInfotextsCache --> task_RefreshJISInfotextsCacheTask;
386
+ task_RefreshJISInfotextsCacheTask <-- "`Data infotextů`" --> psql_jis_infotexts;
387
+ task_RefreshJISInfotextsCacheTask <-- "`GTFS ids zastávek a ids infotextů`" --> psql_jis_infotexts_ropidgtfs_stops;
388
+ task_RefreshJISInfotextsCacheTask -- "`HSET jisCache:$setId:infotexts a jisCache:$setId:stops-infotexts, EXPIRE staré sady`" --> redis_jisCache;
389
+ ```
390
+
391
+ ### Flowchart (v4 transferboards API)
392
+
393
+ ![flowchart.svg](../../assets/V4Transferboards.svg)
394
+
395
+ link na .drawio [soubor](../../assets/V4Transferboards.drawio)
package/docs/jis/index.md CHANGED
@@ -123,9 +123,11 @@ flowchart TB
123
123
  subgraph "Golemio VP Integration Engine"
124
124
  golemio_refresh_events_task["`RefreshJISEventsTask`"];
125
125
  golemio_refresh_infotexts_task["`RefreshJISInfotextsTask`"];
126
+ golemio_refresh_infotexts_cache_task["`RefreshJISInfotextsCacheTask`"];
126
127
  end
127
128
 
128
129
  vp_pg[("`VP PostgreSQL`")];
130
+ vp_redis[("`VP Redis (Valkey)`")];
129
131
  end
130
132
 
131
133
  vymi_events_controller_create --> vymi_get_events;
@@ -134,8 +136,8 @@ flowchart TB
134
136
  vymi_infotexts_controller_create --> vymi_get_infotexts;
135
137
  vymi_infotexts_controller_update --> vymi_get_infotexts;
136
138
 
137
- vymi_get_events -- "`SELECT aktuálních událostí z tabulek vehicle-positions.pid.jis_events a vehicle-positions.pid.jis_events_ropidgtfs_routes`" --> vymi_pg;
138
- vymi_get_infotexts -- "`SELECT aktuálních infotextů z tabulek vehicle-positions.pid.jis_infotexts a vehicle-positions.pid.jis_infotexts_ropidgtfs_stops`" --> vymi_pg;
139
+ vymi_get_events <-- "`SELECT aktuálních událostí z tabulek vehicle-positions.pid.jis_events a vehicle-positions.pid.jis_events_ropidgtfs_routes`" --> vymi_pg;
140
+ vymi_get_infotexts <-- "`SELECT aktuálních infotextů z tabulek vehicle-positions.pid.jis_infotexts a vehicle-positions.pid.jis_infotexts_ropidgtfs_stops`" --> vymi_pg;
139
141
 
140
142
  vymi_get_events --> golemio_api_post_events;
141
143
  vymi_get_infotexts --> golemio_api_post_infotexts;
@@ -151,9 +153,12 @@ flowchart TB
151
153
 
152
154
  golemio_refresh_events_task -- "`UPSERT do tabulek vehicle-positions.pid.jis_events a vehicle-positions.pid.jis_events_ropidgtfs_routes`" --> vp_pg;
153
155
  golemio_refresh_infotexts_task -- "`UPSERT do tabulek vehicle-positions.pid.jis_infotexts a vehicle-positions.pid.jis_infotexts_ropidgtfs_stops`" --> vp_pg;
156
+ golemio_refresh_infotexts_task --> golemio_refresh_infotexts_cache_task;
157
+
158
+ golemio_refresh_infotexts_cache_task -- "`Aktualizace cache jisCache:infotexts:* a jisCache:stop-infotexts:*`" --> vp_redis;
154
159
  ```
155
160
 
156
- Formát zasílaných dat je dále více popsán v implementační dokumentaci ([události](../implementation_documentation.md#jis-events-1), [infotexty](../implementation_documentation.md#jis-infotexts-1)), stejně tak jako odkazy na [Input Gateway OpenAPI](../implementation_documentation.md#input-api) a popis [uložení dat](../implementation_documentation.md#uložení-dat) včetně databázového schema a popisu retence.
161
+ Formát zasílaných dat je dále více popsán v implementační dokumentaci ([události](../implementation_documentation.md#jis-events-1), [infotexty](../implementation_documentation.md#jis-infotexts-1)), stejně tak jako odkazy na [Input Gateway OpenAPI](../implementation_documentation.md#input-api) a popis [uložení dat](../implementation_documentation.md#uložení-dat) včetně databázového schema a popisu retence. Data infotextů jsou dále cachovány - tento proces je popsán v dokumentaci [Redis cache](../cache/types/redis.md#cache-pro-api-přestupních-tabulí-transfer-boards).
157
162
 
158
163
  ## Pasivní načítání (pull) dat
159
164
 
@@ -202,6 +207,7 @@ flowchart TB
202
207
  golemio_fetch_infotexts_task["`FetchJISInfotextsTask`"];
203
208
  golemio_refresh_events_task["`RefreshJISEventsTask`"];
204
209
  golemio_refresh_infotexts_task["`RefreshJISInfotextsTask`"];
210
+ golemio_refresh_infotexts_cache_task["`RefreshJISInfotextsCacheTask`"];
205
211
 
206
212
  %% invisible unicode char ‎ due to https://github.com/orgs/community/discussions/106690
207
213
  golemio_api_get_events["`HTTPS GET s API klíčem na https‎://api-vymi.golemio.cz/v1/exports/events/custom-format`"];
@@ -209,10 +215,11 @@ flowchart TB
209
215
  end
210
216
 
211
217
  vp_pg[("`VP PostgreSQL`")];
218
+ vp_redis[("`VP Redis (Valkey)`")];
212
219
  end
213
220
 
214
- vymi_get_events -- "`SELECT aktuálních událostí z tabulek vehicle-positions.pid.jis_events a vehicle-positions.pid.jis_events_ropidgtfs_routes`" --> vymi_pg;
215
- vymi_get_infotexts -- "`SELECT aktuálních infotextů z tabulek vehicle-positions.pid.jis_infotexts a vehicle-positions.pid.jis_infotexts_ropidgtfs_stops`" --> vymi_pg;
221
+ vymi_get_events <-- "`SELECT aktuálních událostí z tabulek vehicle-positions.pid.jis_events a vehicle-positions.pid.jis_events_ropidgtfs_routes`" --> vymi_pg;
222
+ vymi_get_infotexts <-- "`SELECT aktuálních infotextů z tabulek vehicle-positions.pid.jis_infotexts a vehicle-positions.pid.jis_infotexts_ropidgtfs_stops`" --> vymi_pg;
216
223
 
217
224
  golemio_rabbit_fetch_events --> golemio_fetch_events_task;
218
225
  golemio_rabbit_fetch_infotexts --> golemio_fetch_infotexts_task;
@@ -233,6 +240,9 @@ flowchart TB
233
240
 
234
241
  golemio_refresh_events_task -- "`UPSERT do tabulek vehicle-positions.pid.jis_events a vehicle-positions.pid.jis_events_ropidgtfs_routes`" --> vp_pg;
235
242
  golemio_refresh_infotexts_task -- "`UPSERT do tabulek vehicle-positions.pid.jis_infotexts a vehicle-positions.pid.jis_infotexts_ropidgtfs_stops`" --> vp_pg;
243
+ golemio_refresh_infotexts_task --> golemio_refresh_infotexts_cache_task;
244
+
245
+ golemio_refresh_infotexts_cache_task -- "`Aktualizace cache jisCache:infotexts:* a jisCache:stop-infotexts:*`" --> vp_redis;
236
246
  ```
237
247
 
238
248
  Zdroj a formát dat pro aktivní stahování jsou dále více popsány v implementační dokumentaci ([události](../implementation_documentation.md#jis-events), [infotexty](../implementation_documentation.md#jis-infotexts)), stejně tak jako [worker a tasky](../implementation_documentation.md#jisworker) a popis [uložení dat](../implementation_documentation.md#uložení-dat) včetně databázového schema a popisu retence.
@@ -453,6 +453,12 @@ components:
453
453
  type: array
454
454
  items:
455
455
  type: object
456
+ required:
457
+ - routeName
458
+ - note
459
+ - apiVersion
460
+ - route
461
+ - query
456
462
  properties:
457
463
  routeName:
458
464
  type: string
@@ -469,6 +475,9 @@ components:
469
475
  query:
470
476
  type: string
471
477
  example: "?minutesAfter=300&limit=8&mode=departures&cisIds=40110"
478
+ isTesting:
479
+ type: boolean
480
+ example: true
472
481
  JISEvents:
473
482
  title: JIS events
474
483
  type: array
@@ -831,14 +840,16 @@ components:
831
840
  "note": "Tablo Zahradní město z centra (APEX)",
832
841
  "apiVersion": 2,
833
842
  "route": "/pid/departureboards",
834
- "query": "?minutesAfter=40&limit=6&mode=departures&filter=routeHeadingOnceNoGapFill&order=real&aswIds=2781_2&aswIds=2781_52&skip=atStop&airCondition=true"
843
+ "query": "?minutesAfter=40&limit=6&mode=departures&filter=routeHeadingOnceNoGapFill&order=real&aswIds=2781_2&aswIds=2781_52&skip=atStop&airCondition=true",
844
+ "isTesting": true
835
845
  },
836
846
  {
837
847
  "routeName": "apex-zahradnimesto-6048-kopie",
838
848
  "note": "Tablo Zahradní město z centra (APEX)",
839
849
  "apiVersion": 2,
840
850
  "route": "/pid/departureboards",
841
- "query": "?minutesAfter=40&limit=6&mode=departures&filter=routeHeadingOnceNoGapFill&order=real&aswIds=2781_2&aswIds=2781_52&skip=atStop&airCondition=true"
851
+ "query": "?minutesAfter=40&limit=6&mode=departures&filter=routeHeadingOnceNoGapFill&order=real&aswIds=2781_2&aswIds=2781_52&skip=atStop&airCondition=true",
852
+ "isTesting": false
842
853
  }
843
854
  ]
844
855
  JISEventsExample: