Recently in our project we added a web-socket service for push records in our store without making polling all time; the integration was very successful but we’re having many issues with reloading records that are in root.loaded.updated.inFlight
…
The problem is that we have to handle the disconnection event of the pusher service, for manage the status of the controllers and keep the data up to date; for do this we have created a handler in our controllers:
App.DashboardController = App.Controller.extend({
disconnect: function() {
this.get('model').reload();
}
});
This works fine the 95% of the cases, but in some scenarios the model is currently refreshing their data, and Ember Data throws an exception:
Attempted to handle event 'reloadRecord' on <App.User:ember1701:3375789> while in state root.loaded.updated.inFlight
.
I also read about forcing a transition in the record but this hack doesn’t work for us because at any time we can receive new records via the socket… So guys, what we can do for fix this issue?