You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, we can only reconfigure through the UI, so I can add a plugin method to restart the data collection - albeit in a somewhat hacky way. But later, we may get configs that are pushed from the server. We need to be able to restart the collection in that case, but also we don't want to restart for every config push because nothing might have changed.
We already had support for turning tracking off, but then we just went back to
the start state. That is not a good solution because in order to make the
normal case more robust, we re-send the initialize transition if we are in the
start state.
So now, when we turn tracking off, we go to a different state
`tracking_stopped`, and the only way to get out of it is to recieve a new
`start_tracking` transition.
Also:
- refactored the plugin interface code to force general transitions instead of
expanding the existing hardcoded list.
- ensured that the state machine is reset when the config changes through UI
input by turning tracking on and off
The second of these is a workaround, not a real solution, since it doesn't deal
with automatic updates from the server that could come in as part of the sync,
and it is not clear that stopping and restarting tracking (or at least, doing
so in the current, hacky way) is the best way to reset.
Long-term solution is tracked at:
e-mission#105
Right now, we can only reconfigure through the UI, so I can add a plugin method to restart the data collection - albeit in a somewhat hacky way. But later, we may get configs that are pushed from the server. We need to be able to restart the collection in that case, but also we don't want to restart for every config push because nothing might have changed.
Some form of versioning might be useful, and will also solve the race with rw-documents from e-mission/cordova-server-sync#12
We should also come up with a less hacky version of restarting data collection!?
The text was updated successfully, but these errors were encountered: