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

Use updated syncing procedures in Vuex actions. #479

Closed
jgaehring opened this issue Dec 31, 2021 · 2 comments
Closed

Use updated syncing procedures in Vuex actions. #479

jgaehring opened this issue Dec 31, 2021 · 2 comments

Comments

@jgaehring
Copy link
Member

In the course of #465, particularly commit 04fd9e8, I used the implementation of refreshCache and syncCache to try out some new ideas for improving the behavior of FK's syncing logic, as well as its internal architecture. In particular, I tried to isolate the syncEntity function from the specific requirements of syncCache so that I might eventually employ this function in the syncEntities action in the Vuex store as well. If it is successful there, I may even wish to include this in farmOS.js itself, as part of the special functionality provided when you use the main farmOS constructor that integrates features of both the model and the client.

In terms of behavioral improvements, there are some much needed fixes in syncEntity, as well as corresponding improvements in farmOS.js (beta releases 2 and 4), which will ensure that syncing entities in FK will be more exhaustive, with the introduction of the limit option. I also want to use the opportunity to make improvements to SyncError and fully integrate the cacheEntity and cachingCriteria functions from idb/cache.js.

jgaehring added a commit to jgaehring/field-kit that referenced this issue Jan 7, 2022
@jgaehring
Copy link
Member Author

Most of the necessary changes have been made with 35aae84, but I think I still need to fine tune some issues in farmOS.js. Namely, I've noticed that not all entities are getting their lastSync timestamp set properly, which is causing unnecessary send requests. Also, some taxonomy terms aren't getting created metadata from the server, and are being given a url or /taxonomy_term/undefined, which should be fixed, but is not a blocker for this issue.

@jgaehring
Copy link
Member Author

I've noticed that not all entities are getting their lastSync timestamp set properly

I think this was just a relic of the failed syncs that were leaving some bad metadata in the database as I was testing. Clearing all site data and running it fresh seems to have resolved this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant