diff --git a/arielle.py b/arielle.py index 1104c57..bc027ba 100644 --- a/arielle.py +++ b/arielle.py @@ -55,6 +55,8 @@ def main(): record_list = [] _date_last = {} + initial_timestamp = create_timestamp().replace(':', '-').replace('.', '-') + # Collecting loop while True: start = time.time() @@ -68,7 +70,7 @@ def main(): data = w.get(endpoint) record_list.append({'info': {'record_id': record_id, 'timestamp': timestamp}, 'data': data}) folder = f_mgr.update(f"results/{vin}", _date) - filename = f"vehicle_{vin}.json" + filename = f"vehicle_{vin}_{initial_timestamp}.json" _path = os.path.join(folder, filename) with open(_path, "w") as fp: json.dump(record_list, fp, indent=4)