riptidewave93 / UNVR-NAS

Convert your Unifi UNVR/UNVR Pro into a Debian OpenMediaVault NAS Appliance
73 stars 3 forks source link

Improve ustorage CLI implementation with worker/client for caching #1

Closed riptidewave93 closed 5 months ago

riptidewave93 commented 5 months ago

Right now our ustorage replacement at https://github.com/riptidewave93/UNVR-NAS/blob/main/overlay/filesystem/usr/bin/ustorage does all calls/lookups/rendering directly. We should move this to maybe another system service that runs every X seconds, and stashes the output. This way, when ulcmd calls ustorage it can respond almost instantly with results.

However, it needs to be considered that ulcmd learns about disk changes from this call, so we want to be reasonably quick. My thought is:

riptidewave93 commented 5 months ago

Decided to just update the tool to do the caching, we don't need a daemon for this.

https://github.com/riptidewave93/UNVR-NAS/commit/fe3b4cd76f45479e9dc69986ffb2ec45c30bcd32

Resolved with above commit.