Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove unused routes-at-stop agent #2116

Merged
merged 1 commit into from
Jul 31, 2024
Merged

Commits on Jul 31, 2024

  1. refactor: remove unused routes-at-stop agent

    d52ead8, which introduced more comprehensive V3 API request caching,
    removed the only instance where `put` was ever called on this cache, so
    it was effectively unused.
    
    After removing a few layers of indirection:
    
    * `Stop.create_station_with_routes_map` is renamed and relocated to
      `Route.serving_stop`. Unclear why the previous name suggested it would
      "create a map".
    
    * The similar-in-nature `Route.fetch_routes_by_stop` is renamed to
      `Route.serving_stop_with_active` so these names are aligned.
    
    * Logging is added to the retry logic of `serving_stop` so we can tell
      whether it's still being used. This seems like a workaround for a
      possible bug in the V3 API which may have since been fixed, and if it
      hasn't been, we'll know and can report it.
    
    * `serving_stop_with_active` is fixed to conform to its typespec (and
      the spec of `LocationContext`) by returning a map containing _only_
      `route_id` and `active?` fields, rather than a map version of the
      entire `Route` struct with the `id` field renamed. It appears nothing
      was accessing the extra fields.
    digitalcora committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    921aeaf View commit details
    Browse the repository at this point in the history