954 B
954 B
English · Dansk · Bahasa Melayu
Step 9: Resilience against network failures
What you gain
You learn to retry: retry(func, retries=7, description=None) repeats a call that raises, waits between attempts, logs a warning and raises RetriesExhaustedError at the end. login(), book_class() and get_my_bookings() are wrapped with it, so a site that drops requests does not stop the run.
Where it is in the code
src/snack_and_lift/application/retry.py
Screenshot
This screenshot needs a run with a real gym account. The maintainer adds it with
--screenshot-dir(see Getting started); until then the filedocs/images/step-9.pngis missing and the image above does not show.
