lib/config: Allow sub-second watcher delay (fixes #7859) (#7864)

Allow the watcher delay to take fractional values, effectively allowing
for much shorter delays. The minimum value is limited at 0.01, which
effectively translates to 10ms. This is required in order to guarantee
that there is still enough time to aggregate multiple single change
events.

Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
This commit is contained in:
tomasz1986
2023-03-18 08:50:38 +01:00
committed by GitHub
parent 59de7048bd
commit 358cf25cff
5 changed files with 174 additions and 178 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ message FolderConfiguration {
repeated FolderDeviceConfiguration devices = 6;
int32 rescan_interval_s = 7 [(ext.xml) = "rescanIntervalS,attr", (ext.default) = "3600"];
bool fs_watcher_enabled = 8 [(ext.goname) = "FSWatcherEnabled", (ext.xml) = "fsWatcherEnabled,attr", (ext.default) = "true"];
int32 fs_watcher_delay_s = 9 [(ext.goname) = "FSWatcherDelayS", (ext.xml) = "fsWatcherDelayS,attr", (ext.default) = "10"];
double fs_watcher_delay_s = 9 [(ext.goname) = "FSWatcherDelayS", (ext.xml) = "fsWatcherDelayS,attr", (ext.default) = "10"];
bool ignore_perms = 10 [(ext.xml) = "ignorePerms,attr"];
bool auto_normalize = 11 [(ext.xml) = "autoNormalize,attr", (ext.default) = "true"];
Size min_disk_free = 12 [(ext.default) = "1 %"];