diff --git a/update.py b/update.py index 1ece57e..3d2576c 100755 --- a/update.py +++ b/update.py @@ -264,6 +264,12 @@ def update_thespacedevs(config: flask.config.Config) -> None: existing_data = agenda.thespacedevs.load_cached_launches(rocket_dir) assert existing_data + # Refresh active crewed mission cache used by the launches page. + # Failures are handled internally with cache fallback. + active_crewed = agenda.thespacedevs.get_active_crewed_flights( + rocket_dir, refresh=True + ) + # Always follow configured slugs follow_slugs: set[str] = set(config["FOLLOW_LAUNCHES"]) @@ -313,6 +319,7 @@ def update_thespacedevs(config: flask.config.Config) -> None: return rockets = [agenda.thespacedevs.summarize_launch(item) for item in data["results"]] print(len(rockets), "launches") + print(len(active_crewed or []), "active crewed missions") print(f"took {time_taken:.1f} seconds")