FlightAware time window

Q1: If a flight duration is just 2 hours and in the FlightAware Command the time range is provided for around 16 hours (starting 12 hours prior the actual flight takeoff time), will it impact the command output/execution time or FlightAware API has in-built intelligence to ignore the time window outside the actual flight duration. What’s the best practice of providing range values?

Sample FlightAware Command: range 1653503400 1653607800 events “position” idents “IBE3018”

Q2: We have implemented similar Python code base like the following example to process FlightAware data. On a high level, the code base process the json output from the FlightAware range command line by line by reading 8 KB data at a time, and once there is no data, it stops the execution.

For the example stated in Q1, we have noticed the API intermittently doesn’t send any data at all or stop sending any data after some time. There is no error or exception. If I provide the range closer to the actual flight time, it works.

firehose_examples/python/example1 at master · flightaware/firehose_examples · GitHub

Q3: What’s the best way to graciously close the socket connection due to exception while processing FlightAware data through API call? We’ve used ssl_sock.close() while handling exception. However, noticed the socket connection is not getting closed as we’re facing maximum connection limit exception.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.