When does the cleanup trigger? Default is 3600s, so does that mean it doesn’t take place on Syncthing startup, but every 3600s after startup? I’ve got users complaining clean up doesn’t take place, we think the root cause is that the Android app doesn’t run the Syncthingnative for at least 3600s non-stop.
My suggested workaround is to lower the cleanup interval default -or- if there is one , call a restapi endpoint “cleanupNow” immediately after Syncthingnative started up. Does such an endpoint exist?
This would also help on Android where battery savvy people exit Syncthing or stop by run conditions whenever they can so versions do not get cleaned out at the moment.
The implemented workaround in Syncthing-Fork (Android) works as follows:
When SyncthingNative starts up, RestApi takes care of detecting when the REST API is available after successful startup and loads the config into the wrapper’s memory.
It then modifies the config by setting all “cleanupIntervalS” instances to “2” (seconds) to trigger the cleanup shortly after startup.
After 10 seconds, it sets all “cleanupIntervalS” instances to “3600” (seconds) which is Syncthing’s default.
Disadvantages: the user no longer is able to persistently customize “cleanupIntervalS” on Android as the wrapper interacts with that values on every startup plus the next 10 seconds after it.
I’ve verified this workaround on my Android 13 phone, PixelExperience Plus on Xiaomi mi 8.