eval_recoreds now reads older records
This commit is contained in:
+16
-8
@@ -7,7 +7,7 @@ BASE = "results"
|
||||
VIN = 'WVWZZZE1ZMP010760'
|
||||
YEAR = 2024
|
||||
MONTH = 10
|
||||
DAY = ['20']
|
||||
DAY = ['19']
|
||||
|
||||
|
||||
class Endpoint:
|
||||
@@ -120,16 +120,24 @@ for day in day_list:
|
||||
for record in records:
|
||||
try:
|
||||
vehicle_diff = record['data']
|
||||
if not record['info']['is_delta']:
|
||||
is_header = True
|
||||
if 'is_delta' in record['info']:
|
||||
if record['info']['is_delta']:
|
||||
is_header = False
|
||||
print(f"Found delta record #{record['info']['record_id']}")
|
||||
|
||||
if is_header:
|
||||
print(f"Found full record #{record['info']['record_id']}")
|
||||
last = {}
|
||||
print(f"Found full record {record['info']['record_id']}")
|
||||
else:
|
||||
print(f"Found delta record {record['info']['record_id']}")
|
||||
|
||||
except KeyError:
|
||||
pass
|
||||
except KeyError as e:
|
||||
print(f"KeyError: {e}")
|
||||
|
||||
if is_header:
|
||||
vehicle_data = vehicle_diff
|
||||
else:
|
||||
vehicle_data = jay_merge_full(last, vehicle_diff)
|
||||
|
||||
vehicle_data = jay_merge_full(last, vehicle_diff)
|
||||
last = vehicle_data
|
||||
try:
|
||||
for end_point in end_points:
|
||||
|
||||
Reference in New Issue
Block a user