ADSB backfill fix?

This commit is contained in:
2026-06-27 17:05:59 -04:00
parent 73f7908aab
commit 93dce28cca

View File

@@ -233,18 +233,8 @@ export async function enrichAircraft(a) {
// 2. Race the two external sources // 2. Race the two external sources
if(noRecord.includes(icao)) return { icao, ...a, type: 'unknown' }; if(noRecord.includes(icao)) return { icao, ...a, type: 'unknown' };
let found = await Promise.any([ let found = 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) { if(!found) {
console.log(`Not Found: ${icao}`)
noRecord.push(icao); noRecord.push(icao);
return { icao, ...a, type: 'unknown' }; return { icao, ...a, type: 'unknown' };
} }