From effdd811147828cb32b394cbd600058bd780ed8c Mon Sep 17 00:00:00 2001 From: ztimson Date: Sat, 27 Jun 2026 17:03:01 -0400 Subject: [PATCH] ADSB backfill fix? --- server/src/adsb.mjs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/server/src/adsb.mjs b/server/src/adsb.mjs index e7e76c8..fd3b861 100644 --- a/server/src/adsb.mjs +++ b/server/src/adsb.mjs @@ -234,8 +234,14 @@ 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) { noRecord.push(icao);