ADSB backfill fix?

This commit is contained in:
2026-06-27 17:03:01 -04:00
parent 6bc4d920f8
commit effdd81114

View File

@@ -234,8 +234,14 @@ 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 = await Promise.any([
fetchHexDb(icao), fetchHexDb(icao).then(resp => {
scrapeHexDatabase(icao), if(resp) console.log(`Source1: ${icao}`)
return resp;
}),
scrapeHexDatabase(icao).then(resp => {
if(resp) console.log(`Source2: ${icao}`)
return resp;
}),
]).catch(() => null); ]).catch(() => null);
if(!found) { if(!found) {
noRecord.push(icao); noRecord.push(icao);