parent
a275683f90
commit
458dfc5136
1 changed files with 7 additions and 0 deletions
|
|
@ -264,6 +264,12 @@ def update_thespacedevs(config: flask.config.Config) -> None:
|
||||||
existing_data = agenda.thespacedevs.load_cached_launches(rocket_dir)
|
existing_data = agenda.thespacedevs.load_cached_launches(rocket_dir)
|
||||||
assert existing_data
|
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
|
# Always follow configured slugs
|
||||||
follow_slugs: set[str] = set(config["FOLLOW_LAUNCHES"])
|
follow_slugs: set[str] = set(config["FOLLOW_LAUNCHES"])
|
||||||
|
|
||||||
|
|
@ -313,6 +319,7 @@ def update_thespacedevs(config: flask.config.Config) -> None:
|
||||||
return
|
return
|
||||||
rockets = [agenda.thespacedevs.summarize_launch(item) for item in data["results"]]
|
rockets = [agenda.thespacedevs.summarize_launch(item) for item in data["results"]]
|
||||||
print(len(rockets), "launches")
|
print(len(rockets), "launches")
|
||||||
|
print(len(active_crewed or []), "active crewed missions")
|
||||||
print(f"took {time_taken:.1f} seconds")
|
print(f"took {time_taken:.1f} seconds")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue