Compare commits

..

2 Commits

Author SHA1 Message Date
73f7908aab ADSB backfill fix? 2026-06-27 17:03:24 -04:00
effdd81114 ADSB backfill fix? 2026-06-27 17:03:01 -04:00

View File

@@ -234,10 +234,17 @@ export async function enrichAircraft(a) {
// 2. Race the two external sources
if(noRecord.includes(icao)) return { icao, ...a, type: 'unknown' };
let found = await Promise.any([
fetchHexDb(icao),
scrapeHexDatabase(icao),
fetchHexDb(icao).then(resp => {
if(resp) console.log(`Source1: ${icao}`)
return resp;
}),
scrapeHexDatabase(icao).then(resp => {
if(resp) console.log(`Source2: ${icao}`)
return resp;
}),
]).catch(() => null);
if(!found) {
console.log(`Not Found: ${icao}`)
noRecord.push(icao);
return { icao, ...a, type: 'unknown' };
}