-
Notifications
You must be signed in to change notification settings - Fork 0
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
Associations with old data are not removed/updated. #24
Comments
Testing has shown that |
After lots of confusion over how For CityBus, So, the issue here is not that the associations are not removed, but rather that the associations are being removed and re-added in update cycles where the two sources are out-of-sync. The solution that I've come up with is to change Conductor's if dissociate(last_station, vehicle)
fire(:depart)
end
unless next_station == last_station
associate(next_station, vehicle)
end Having the dissociation come first ensures that the Will test and report back. |
…vehicle.last_station`. The issue described in #24 was occuring because `next_station` and `last_station` were referring to the same station. That meant that after `dissociate`ing the `last_station` and sending a `depart` event to that station, it was being re`associated`, causing Conductor to essentially assume that the previous cycle didn't happen, and thus resend the `depart` event. Adding a `next_station != last_station` guard clause around `associate(next_station, vehicle)` seems to have fixed this issue.
Closed by 54cb98a. The guard clause given above seems to have worked properly. |
Vehicles are continuously sending
depart
events to stations that they left long ago, meaning thatdissociate
is either not working as expected (or is not being called appropriately), or thelast_station
property for the vehicles is not being properly.The text was updated successfully, but these errors were encountered: