Resilient Record Importer
Challenge on lesson: Checkpoint: A Resilient Importer
CHALLENGE
Difficulty: intermediate+25 XP
Implement import_records(sources) where sources is a list of callables, each returning a list of dicts or raising. For each source: retry up to 2 times on failure; on final failure, log it (logger 'pi.importer', any level >= WARNING) and continue. Return the concatenated list of successfully fetched dicts. Preserve order. If EVERY source fails, raise ImportError-like error: raise RuntimeError('all sources failed').
Press Submit to check your solution.
Back to lesson: Checkpoint: A Resilient Importer