-
Notifications
You must be signed in to change notification settings - Fork 5
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
Device definitions sync tableland #141
Conversation
scripts/tableland/tasks.ts
Outdated
// delete dd | ||
let deleteDeviceDefinitionByManufacturers = []; | ||
deviceDefinitionByManufacturers.forEach(element => { | ||
const dds = tablelandDeviceDefinitionByManufacturers.filter((c) => c.ksuid === element.device_definition_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm actually I think this should be the other way around:
- iterate over tableland defs
- for each lookup in deviceDefinitions
- if not found, delete from tableland.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean I guess this would work, and is accounting for differences in the id to delete. But there are certain scenarios where i think we wouldn't be deleting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After James' comments I think we will be good to go
No description provided.