@golemio/pid 2.11.5-dev.1155705545 → 2.11.5-rc.1155791815
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.
|
@@ -117,7 +117,7 @@ class RawQueryProvider {
|
|
|
117
117
|
SELECT DISTINCT
|
|
118
118
|
"${const_1.PG_SCHEMA}".ropidgtfs_trips.trip_id as gtfs_trip_id,
|
|
119
119
|
"${const_1.PG_SCHEMA}".ropidgtfs_trips.direction_id as gtfs_direction_id,
|
|
120
|
-
|
|
120
|
+
"${const_1.PG_SCHEMA}".ropidgtfs_precomputed_trip_schedule.date as gtfs_date,
|
|
121
121
|
"${const_1.PG_SCHEMA}".ropidgtfs_trips.block_id as gtfs_block_id,
|
|
122
122
|
"${const_1.PG_SCHEMA}".ropidgtfs_trips.trip_headsign as gtfs_trip_headsign,
|
|
123
123
|
"${const_1.PG_SCHEMA}".ropidgtfs_trips.trip_short_name as gtfs_trip_short_name,
|
|
@@ -127,28 +127,20 @@ class RawQueryProvider {
|
|
|
127
127
|
wanted_trip.cis_trip_number,
|
|
128
128
|
"${const_1.PG_SCHEMA}".ropidgtfs_precomputed_minmax_stop_sequences.min_stop_time,
|
|
129
129
|
"${const_1.PG_SCHEMA}".ropidgtfs_precomputed_minmax_stop_sequences.max_stop_time,
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
"${const_1.PG_SCHEMA}".ropidgtfs_precomputed_trip_schedule.run_number as internal_run_number,
|
|
131
|
+
"${const_1.PG_SCHEMA}".ropidgtfs_precomputed_trip_schedule.origin_route_name as internal_route_name
|
|
132
132
|
FROM "${const_1.PG_SCHEMA}".ropidgtfs_trips
|
|
133
133
|
INNER JOIN wanted_trip ON 1 = 1
|
|
134
134
|
INNER JOIN "${const_1.PG_SCHEMA}".ropidgtfs_routes ON "${const_1.PG_SCHEMA}".ropidgtfs_trips.route_id=ropidgtfs_routes.route_id
|
|
135
135
|
INNER JOIN "${const_1.PG_SCHEMA}".ropidgtfs_stop_times ON "${const_1.PG_SCHEMA}".ropidgtfs_trips.trip_id=ropidgtfs_stop_times.trip_id
|
|
136
|
-
LEFT JOIN "${const_1.PG_SCHEMA}".
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
LEFT JOIN "${const_1.PG_SCHEMA}".ropidgtfs_precomputed_trip_schedule
|
|
137
|
+
ON "${const_1.PG_SCHEMA}".ropidgtfs_trips.trip_id=ropidgtfs_precomputed_trip_schedule.trip_id
|
|
138
|
+
AND ropidgtfs_precomputed_trip_schedule.start_timestamp::date = current_date
|
|
139
139
|
LEFT JOIN "${const_1.PG_SCHEMA}".ropidgtfs_precomputed_minmax_stop_sequences ON "${const_1.PG_SCHEMA}".ropidgtfs_trips.trip_id="${const_1.PG_SCHEMA}".ropidgtfs_precomputed_minmax_stop_sequences.trip_id
|
|
140
140
|
WHERE
|
|
141
141
|
"${const_1.PG_SCHEMA}".ropidgtfs_trips.trip_id ~ CONCAT('\\d+_', wanted_trip.cis_trip_number, '_\\d+')
|
|
142
142
|
AND "${const_1.PG_SCHEMA}".ropidgtfs_routes.route_type = '2'
|
|
143
143
|
AND stop_sequence = 1
|
|
144
|
-
AND abs(
|
|
145
|
-
extract(
|
|
146
|
-
epoch from (
|
|
147
|
-
((psc.date::timestamp at time zone 'Europe/Prague') + ropidgtfs_precomputed_minmax_stop_sequences.min_stop_time::interval) - wanted_trip.start_timestamp
|
|
148
|
-
)
|
|
149
|
-
|
|
150
|
-
)
|
|
151
|
-
) < 43200 -- 12 hours, to ensure that correct gtfs date is selected, we recalculate expected start_timestamp and compare it with wanted_trip one
|
|
152
144
|
AND ( CASE WHEN SUBSTRING(LPAD(ropidgtfs_stop_times.departure_time, 8, '0'),1,2)::int < 24 THEN
|
|
153
145
|
"${const_1.PG_SCHEMA}".ropidgtfs_trips.service_id IN (
|
|
154
146
|
SELECT service_id FROM "${const_1.PG_SCHEMA}".ropidgtfs_calendar
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RawQueryProvider.js","sourceRoot":"","sources":["../../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/RawQueryProvider.ts"],"names":[],"mappings":";;;AAAA,sEAAuC;AACvC,+GAA4E;AAC5E,6GAA0E;AAC1E,6IAA0G;AAC1G,mDAA8C;AAC9C,+DAA4D;AAE5D,MAAa,gBAAgB;IAClB,MAAM,CAAC,2BAA2B;QACrC,OAAO;;;;;;;oBAOK,iBAAS,KAAK,2BAAY,CAAC,UAAU;;SAEhD,CAAC;IACN,CAAC;IAEM,MAAM,CAAC,2BAA2B,CAAC,gBAAwB,EAAE,yBAAiC;QACjG,4BAA4B;QAC5B,OAAO;;mBAEI,iBAAS;mBACT,iBAAS;mBACT,iBAAS;mBACT,iBAAS;mBACT,iBAAS;mBACT,iBAAS;mBACT,iBAAS;mBACT,iBAAS;mBACT,iBAAS;mBACT,iBAAS;mBACT,iBAAS;oBACR,iBAAS;0BACH,iBAAS,0BAA0B,iBAAS;0BAC5C,iBAAS,8BAA8B,iBAAS;yBACjD,iBAAS;sBACZ,iBAAS;;yBAEN,iBAAS,qDAAqD,iBAAS;;iBAE/E,iBAAS;;wBAEF,iBAAS;;;mBAGd,iBAAS;qCACS,iBAAS;;kEAEoB,iBAAS;;oCAEvC,iBAAS;;;;;;;;;;;;;;uBActB,iBAAS;8CACc,iBAAS;4BAC3B,gBAAgB;;;oDAGQ,iBAAS;;;qDAGR,iBAAS;;;;;uBAKvC,iBAAS;8CACc,iBAAS;4BAC3B,yBAAyB;;;oDAGD,iBAAS;;;qDAGR,iBAAS;;;;;;;SAOrD,CAAC;QACF,2BAA2B;IAC/B,CAAC;IAEM,MAAM,CAAC,0BAA0B;QACpC,4BAA4B;QAC5B,OAAO;;;;;;;;;;;oBAWK,iBAAS;;;;mBAIV,iBAAS;mBACT,iBAAS
|
|
1
|
+
{"version":3,"file":"RawQueryProvider.js","sourceRoot":"","sources":["../../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/hel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0BAA0B,iBAAS;0BAC5C,iBAAS,8BAA8B,iBAAS;yBACjD,iBAAS;sBACZ,iBAAS;;yBAEN,iBAAS,qDAAqD,iBAAS,8BAA8B,iBAAS;;mBAEpH,iBAAS;uBACL,iBAAS;;;2BAGL,iBAAS;kDACc,iBAAS;;;;;;;;;;;;;;wDAcH,iBAAS;;;yDAGR,iBAAS;;;;;2BAKvC,iBAAS;kDACc,iBAAS;;;;;;;;;;;;;;wDAcH,iBAAS;;;yDAGR,iBAAS;;;;;;;SAOzD,CAAC;QACF,2BAA2B;IAC/B,CAAC;IAEM,MAAM,CAAC,0BAA0B;QACpC,OAAO;sBACO,iBAAS,KAAK,2BAAY,CAAC,UAAU;;;;;;;;;;;;;;;;;;;;;;;oEAuBS,6BAAa,CAAC,QAAQ;;;;;wBAKlE,iBAAS,KAAK,qDAAyB,CAAC,SAAS;8BAC3C,iBAAS,KAAK,2CAAoB,CAAC,YAAY,CAAC,WAAW;;;iEAGxB,yBAAiB,CAAC,WAAW;;;SAGrF,CAAC;IACN,CAAC;CACJ;AApOD,4CAoOC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemio/pid",
|
|
3
|
-
"version": "2.11.5-
|
|
3
|
+
"version": "2.11.5-rc.1155791815",
|
|
4
4
|
"description": "Golemio PID Module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@commitlint/cli": "^11.0.0",
|
|
39
39
|
"@commitlint/config-conventional": "^11.0.0",
|
|
40
40
|
"@golemio/cli": "1.5.0",
|
|
41
|
-
"@golemio/core": "1.9.
|
|
41
|
+
"@golemio/core": "1.9.9",
|
|
42
42
|
"@golemio/db-common": "1.1.3",
|
|
43
43
|
"@golemio/eslint-config": "1.1.1",
|
|
44
44
|
"@types/amqplib": "^0.5.17",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@golemio/core": ">=1.7.0"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@golemio/ovapi-gtfs-realtime-bindings": "1.2.
|
|
80
|
+
"@golemio/ovapi-gtfs-realtime-bindings": "1.2.0",
|
|
81
81
|
"@turf/turf": "^6.5.0",
|
|
82
82
|
"cheap-ruler": "^3.0.2",
|
|
83
83
|
"csv-parser": "^3.0.0",
|