Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Currently, the threshold at which files are purged from disk is hard coded at 95%. Depending on users and systems this can be either too high or too low. Editing the threshold to adjust for user preferences would have to be done in the script where the disk cleanup is run. This is less than ideal because it puts this control out of scope for less technical users and would be wiped out or cause issues during updates.
Proposed Change
Add a purge threshold setting. This setting allows the user to control at what filled percentage the purge activities are run.
Detailed Description of Changes
Adds a configuration item to
advanced.php
to set the purge threshold. Also adds relevant description and warnings.Adds a snippet to
update_birdnet_snippets.sh
to set the default purge threshold. The default matches the threshold that was previously hardcoded.Changes the space equivalence check in
disk_check.sh
to use the newly defined purge threshold.Adds the purge threshold to
install_config.sh