fix(lotw): show the download moving, retry a busy server, fail a dead one
Three reports of the same shape: a 503 for anything wider than a few days before, and since the timeout was raised, a window that sits at 'working' forever. Both are the same missing thing — nothing said what the transfer was doing. The body is now read in chunks and every megabyte is reported. A 503/502/504 is retried twice, 20 s then 40 s, each attempt announced: LoTW answers 'busy' to a wide report often enough that other loggers simply ask again. And the deadline is no longer on the whole exchange, which either cut off a healthy slow download or hid a dead one for twenty minutes — it is ten minutes to START answering (LoTW builds the whole report first) and two minutes of silence once it has, which is the difference between slow and dead.
This commit is contained in:
@@ -12212,7 +12212,10 @@ func (a *App) runDownloadConfirmations(ctx context.Context, svc extsvc.Service,
|
||||
emit(fmt.Sprintf("Downloading all LoTW confirmations for %s…", callLabel))
|
||||
}
|
||||
emit(fmt.Sprintf("Window: since=%q → resolved=%q (scope owncall=%q)", since, sinceDate, ownCall))
|
||||
adifText, err := extsvc.DownloadLoTWConfirmations(ctx, nil, cfg.LoTW, sinceDate, ownCall)
|
||||
// The report arrives over minutes, and a window that says nothing while it
|
||||
// does is indistinguishable from one that has hung — which is what it was
|
||||
// being reported as. Every half-megabyte, say how much has landed.
|
||||
adifText, err := extsvc.DownloadLoTWConfirmations(ctx, nil, cfg.LoTW, sinceDate, ownCall, emit)
|
||||
if err != nil {
|
||||
emit("Download failed: " + err.Error())
|
||||
done(matched, total)
|
||||
|
||||
Reference in New Issue
Block a user