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

Minor Database Handling Fixes #293

Merged
merged 2 commits into from
Dec 31, 2020
Merged

Minor Database Handling Fixes #293

merged 2 commits into from
Dec 31, 2020

Conversation

krkeegan
Copy link
Collaborator

This changes the set_delta function to increment_delta. Increment is really what was needed, plus this way it gracefully handles a delta of None for example if a user used refresh=False. Unit tests included.

I also changed the clear function so that it does not delete the db file, but merely clears the entry lists and associated values. Most importantly it leaves the meta dictionary intact. So IOLincs will function properly after a refresh, and user settings such as battery level will not be erased.

Partially Fixes #292
Fixes #243

Increment is really what was needed.  Gracefully handles a delta
of None for example if a user used refresh=False

Partially Fixes TD22057#292
Fixes TD22057#243
This was linked to issues Dec 31, 2020
krkeegan added a commit to krkeegan/insteon-mqtt that referenced this pull request Dec 31, 2020
Found a bug in how partial messages are reinserted back into
the _write_queue.  But this is not what is causing TD22057#293 as a
different error would appear.

Added Unit Tests of Write_to_Link
@krkeegan krkeegan merged commit e0b6c05 into TD22057:dev Dec 31, 2020
@krkeegan krkeegan deleted the DB_Fixes branch January 3, 2021 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A couple of error reports Don't Delete Database File on Refresh
1 participant