fix: verify jt808 locations from current tdengine table
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was canceled
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was canceled
This commit is contained in:
@@ -125,7 +125,7 @@ class VehicleIngestLiveVerifyTest(unittest.TestCase):
|
|||||||
"rawUri": "archive://frame.bin",
|
"rawUri": "archive://frame.bin",
|
||||||
}])
|
}])
|
||||||
|
|
||||||
def test_jt808_location_sql_uses_dedicated_location_stable_without_protocol_filter(self):
|
def test_jt808_location_sql_uses_current_vehicle_locations_stable_with_protocol_filter(self):
|
||||||
sql = live_verify.jt808_location_count_sql(
|
sql = live_verify.jt808_location_count_sql(
|
||||||
date_from="2026-06-29 00:00:00",
|
date_from="2026-06-29 00:00:00",
|
||||||
date_to="2026-06-29 23:59:59",
|
date_to="2026-06-29 23:59:59",
|
||||||
@@ -133,8 +133,8 @@ class VehicleIngestLiveVerifyTest(unittest.TestCase):
|
|||||||
|
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
sql,
|
sql,
|
||||||
"SELECT COUNT(*) FROM jt808_locations WHERE "
|
"SELECT COUNT(*) FROM vehicle_locations WHERE protocol = 'JT808' "
|
||||||
"ts >= '2026-06-29 00:00:00' AND ts <= '2026-06-29 23:59:59'",
|
"AND ts >= '2026-06-29 00:00:00' AND ts <= '2026-06-29 23:59:59'",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ def jt808_raw_count_sql(date_from: str, date_to: str, peer_like: str = "") -> st
|
|||||||
|
|
||||||
|
|
||||||
def jt808_location_count_sql(date_from: str, date_to: str) -> str:
|
def jt808_location_count_sql(date_from: str, date_to: str) -> str:
|
||||||
return count_sql("jt808_locations", [], date_from, date_to)
|
return count_sql("vehicle_locations", ["protocol = 'JT808'"], date_from, date_to)
|
||||||
|
|
||||||
|
|
||||||
def gb32960_platform_login_count_sql(date_from: str, date_to: str, peer_like: str = "") -> str:
|
def gb32960_platform_login_count_sql(date_from: str, date_to: str, peer_like: str = "") -> str:
|
||||||
|
|||||||
Reference in New Issue
Block a user