The readiness probe that survives a dead dependency
Challenge on lesson: Checkpoint: Production APIs
CHALLENGE
Difficulty: advanced+25 XP
Implement readiness(checks) where checks is a dict mapping dependency names to zero-arg callables:
- returns {'ready': bool, 'checks': {name: bool}} with every name included
- a check that returns a truthy value is healthy; falsy is not
- a check that RAISES is a dependency that is down: record False for it โ the probe itself must never propagate the exception
- ready is True iff every check is True
- an empty checks dict is ready
Press Submit to check your solution.
Back to lesson: Checkpoint: Production APIs