feat: upload to external services clublog qrz

This commit is contained in:
2026-05-28 22:52:50 +02:00
parent e82e30dd02
commit 5c004f5e2f
26 changed files with 1710 additions and 31 deletions
+10 -5
View File
@@ -88,16 +88,21 @@ func (m *Manager) Lookup(ctx context.Context, callsign string) (Result, error) {
return Result{}, fmt.Errorf("empty callsign")
}
if r, ok := m.cache.Get(ctx, call); ok {
r.Source = "cache"
return r, nil
}
m.mu.RLock()
providers := append([]Provider(nil), m.providers...)
dxcc := m.dxcc
m.mu.RUnlock()
if r, ok := m.cache.Get(ctx, call); ok {
r.Source = "cache"
// Re-assert the authoritative DXCC fields (country/zones/continent)
// from cty.dat on every cache hit — cheap (in-memory) and lets a
// corrected entity mapping (e.g. Sicily → Italy) heal stale cached
// rows without waiting for the TTL to expire.
fillFromDXCC(&r, dxcc)
return r, nil
}
var lastErr error
for _, p := range providers {
r, err := p.Lookup(ctx, call)