Skip to content
This repository has been archived by the owner on Mar 5, 2020. It is now read-only.

DB not synced to disk #55

Closed
kisse66 opened this issue Jul 23, 2017 · 3 comments
Closed

DB not synced to disk #55

kisse66 opened this issue Jul 23, 2017 · 3 comments

Comments

@kisse66
Copy link

kisse66 commented Jul 23, 2017

Not sure if this has something to do with my environment only, but I was able to fix this by modifying the code a bit (see below).
Issue is that if I delete a node it disappears from the GUI, but re-appears next time homie-ota is started. This happens even if I manually stop and re-start the service. I run it without virtualenv with separate user using systemd on RPi2 and raspbian jessie. Homie-ota latest from git.

Quick check made me feel the exit function to sync db to disk is never called (so it always restores the old data from disk on startup). I added a print there and yes, it is not called in my RPi when doing systemctl stop (SIGTERM). I'm really not a python person, but the following simple workaround made it work for me:

ota-diff.patch.txt

@jpmens
Copy link
Owner

jpmens commented Jul 23, 2017

Thanks for reporting this, and your solution looks ok. If you care to provide a pull-request, I'll take it.

@kisse66
Copy link
Author

kisse66 commented Jul 23, 2017

Can do that. Not a python person, so didn't know if it makes sense as is. Also didn't test it without systemd using ctrl-c.
I'll setup a PR.

@jpmens
Copy link
Owner

jpmens commented Jul 25, 2017

Closing after merge. Thanks again.

@jpmens jpmens closed this as completed Jul 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants