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: Move StopTimeUpdates storage into a new GenServer #483

Merged
merged 4 commits into from
Mar 3, 2020

Conversation

arkadyan
Copy link
Contributor

@arkadyan arkadyan commented Mar 2, 2020

@spec update(
{:stop_time_updates, StopTimeUpdates.stop_time_updates_by_trip()},
GenServer.server()
) :: term()
def update(update_term, server \\ __MODULE__)

def update({:vehicle_positions, vehicles_by_route_id, shuttles}, server) do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Server.update() can shed its :vehicle_positions tag now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, removed.

stop_time_updates_by_trip: StopTimeUpdates.stop_time_updates_by_trip()
}

defstruct stop_time_updates_by_trip: []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
defstruct stop_time_updates_by_trip: []
defstruct stop_time_updates_by_trip: %{}

@arkadyan arkadyan force-pushed the mss-stu-genserver branch from 348bbf0 to 9641c43 Compare March 3, 2020 15:29
@codecov
Copy link

codecov bot commented Mar 3, 2020

Codecov Report

Merging #483 into master will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #483      +/-   ##
==========================================
- Coverage   97.42%   97.42%   -0.01%     
==========================================
  Files         162      163       +1     
  Lines        3657     3649       -8     
  Branches      485      485              
==========================================
- Hits         3563     3555       -8     
  Misses         90       90              
  Partials        4        4              
Impacted Files Coverage Δ
lib/realtime/stop_time_update_store.ex 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9ef1bed...22ac527. Read the comment docs.

Copy link
Member

@skyqrose skyqrose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is codecov saying that 100% coverage of this code isn't enough?

@arkadyan arkadyan merged commit 7ac8f11 into master Mar 3, 2020
@arkadyan arkadyan deleted the mss-stu-genserver branch March 3, 2020 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants