Open Iture opened 3 months ago
Does the file get loaded again after the unload? If it's still there I would have expected that it gets unloaded and then immediately loaded again.
Nope, that's the full log. Habapp forgets about this file. What's interesting, when I copy files using scp, everythong works, rsync does it in some not compatible way. Another interesting thing: I tried to change behavior of rsync using --inplace flag, but it doesn't change anythong, habapp behaves in the same way. Ah, systems: rsync runs on OSX, copies files using ssh to Linux@arm (raspberry)
I can't make sense of it. Could you additionally show me the corresponding file events from the HABApp events?
They are on the event bus under HABApp.Files
You have everything in the first post, or is there anything more?
No, the corresponding issued file events are missing. You typically find these in the HABApp_events.log
under HABApp.Files
Ahh, I see. Unfortunately I have logging level set to WARN for events, and all is sent to Loki - as I mentioned, whole log is in the first post
You can set the logging level for the event file to INFO, then do rsync and then set it back to warning again. It will be picked up on the fly.
Hi I use rsync to deploy configuration to production, and have habapp running in a docker container. Recently I found a strange behavior of filewatcher. After copying a new file using rsync, it removes any references to it. Probably it happens because rsync creates temporary file and then moves it to final location. Habapp sees this move and then interprets it as file removal. EDIT: Probably the answer is here: https://github.com/spacemanspiff2007/HABApp/blob/5ccb2d6f69e7917a766cac60ac25db5afa2919e6/src/HABApp/core/files/watcher/base_watcher.py#L55 and here: https://github.com/spacemanspiff2007/HABApp/blob/5ccb2d6f69e7917a766cac60ac25db5afa2919e6/src/HABApp/core/files/watcher/base_watcher.py#L61
You can see it in the logs (it's Loki, read from bottom):