thin-edge.io
thin-edge.io copied to clipboard
Firmware plugin to cleanup symlinks from file transfer repository after operation completion
Is your feature improvement request related to a problem? Please describe.
The firmware plugin, as part of processing a firmware request, creates symlinks to cached firmware files in the file-transfer repository at $FILE_TRANSFER_REPO/$CHILD_DEVICE_ID/firmware_update/$FILE_ID
before sending the firmware_update
request to the child devices, but never cleans it up after the operation completes(success or failure). These symlinks must be cleaned-up as leaving them behind is useless anyway, and it might even help with cleaning stale files from the firmware cache by just looking at files that don't have any symlinks pointing to them.
Describe the solution you'd like
Remove the firmware file symlinks from the file transfer repository when an operation finishes either successfully or with a failure.