+5
-2
internal/pds/scanner.go
+5
-2
internal/pds/scanner.go
···
138
138
// Update IP immediately
139
139
s.db.UpdateEndpointIP(ctx, ep.ID, ip, time.Now().UTC())
140
140
141
+
// STEP 1.5: Fetch IP info asynchronously ASAP (runs in parallel with scanning)
142
+
go s.updateIPInfoIfNeeded(ctx, ip)
143
+
141
144
// STEP 2: Health check
142
145
available, responseTime, version, err := s.client.CheckHealth(ctx, ep.Endpoint)
143
146
if err != nil || !available {
···
226
229
log.Verbose("✓ Processed %d repos for %s", len(repoList), ep.Endpoint)
227
230
}
228
231
229
-
// STEP 5: Fetch IP info if needed (async, with backoff)
230
-
go s.updateIPInfoIfNeeded(ctx, ip)
232
+
// IP info fetch already started at the beginning (step 1.5)
233
+
// It will complete in the background
231
234
}
232
235
233
236
func (s *Scanner) saveScanResult(ctx context.Context, endpointID int64, result *ScanResult) {