01234567890123456789012345678901234567890123456789012345678901234567890123456789
7477747874797480748174827483748474857486748774887489749074917492749374947495749674977498 74997500750175027503750475057506750775087509751075117512751375147515751675177518 | <----SKIPPED LINES----> if dump_json_exists: tmp_timestamp = os.path.getmtime(DUMP_JSON_FILE) if (SIMULATION and DumpJsonChanges()) or ( not SIMULATION and dump_json_exists and tmp_timestamp > last_dump_json_timestamp): last_dump_json_timestamp = tmp_timestamp (persistent_nearby_aircraft, flight, now, json_desc_dict, persistent_path, flight_aware_error_message, flight_aware_status_code, flight_aware_timestamp) = ( ScanForNewFlights( persistent_nearby_aircraft, persistent_path, configuration.get('log_jsons', False), flights)) # Logging: As part of the memory instrumentation, let's track # the length of these data structures if not iteration % 1000: lengths = [len(flights), len(screen_history)] Log('Iteration: %d: object lengths: %s' % (iteration, lengths)) # because this might just be an updated instance of the previous # flight as more identifier information (squawk and or flight number) # comes in, we only want to process this if its a truly new flight new_flight_flag = ConfirmNewFlight(flight, flights) if new_flight_flag: # now comes directly from the radio json time_new_flight_found = now # Since we no longer need the memory-hogging prior persistent_path # stored on the flights, we can remove it if flights and 'persistent_path' in flights[-1]: del flights[-1]['persistent_path'] flights.append(flight) remote, servo = RefreshArduinos( remote, servo, to_remote_q, to_servo_q, to_main_q, shutdown, flights, json_desc_dict, configuration, screen_history) <----SKIPPED LINES----> |
01234567890123456789012345678901234567890123456789012345678901234567890123456789
74777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520 | <----SKIPPED LINES----> if dump_json_exists: tmp_timestamp = os.path.getmtime(DUMP_JSON_FILE) if (SIMULATION and DumpJsonChanges()) or ( not SIMULATION and dump_json_exists and tmp_timestamp > last_dump_json_timestamp): last_dump_json_timestamp = tmp_timestamp (persistent_nearby_aircraft, flight, now, json_desc_dict, persistent_path, flight_aware_error_message, flight_aware_status_code, flight_aware_timestamp) = ( ScanForNewFlights( persistent_nearby_aircraft, persistent_path, configuration.get('log_jsons', False), flights)) # Logging: As part of the memory instrumentation, let's track # the length of these data structures if not iteration % 1000: network_status_list = MostRecentNetworkStatuses(3)[0] Log('Iteration: %d: len(flights): %d; network_status_list: %s' % ( iteration, len(flights), network_status_list)) # because this might just be an updated instance of the previous # flight as more identifier information (squawk and or flight number) # comes in, we only want to process this if its a truly new flight new_flight_flag = ConfirmNewFlight(flight, flights) if new_flight_flag: # now comes directly from the radio json time_new_flight_found = now # Since we no longer need the memory-hogging prior persistent_path # stored on the flights, we can remove it if flights and 'persistent_path' in flights[-1]: del flights[-1]['persistent_path'] flights.append(flight) remote, servo = RefreshArduinos( remote, servo, to_remote_q, to_servo_q, to_main_q, shutdown, flights, json_desc_dict, configuration, screen_history) <----SKIPPED LINES----> |