Update 'min_notif_changes' to 'min_notify_changes' (#467)

* Update 'min_notif_changes' to 'min_notify_changes'
This commit is contained in:
abraunegg 2019-04-15 06:28:32 +10:00 committed by GitHub
parent 521cf33001
commit 25d2f7284f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 9 deletions

View file

@ -327,7 +327,7 @@ Config option 'skip_file' = ~*|.~*|*.tmp
Config option 'skip_dotfiles' = false
Config option 'skip_symlinks' = false
Config option 'monitor_interval' = 45
Config option 'min_notif_changes' = 5
Config option 'min_notify_changes' = 5
Config option 'log_dir' = /var/log/onedrive/
Selective sync configured = false
```
@ -521,8 +521,8 @@ Example: `monitor_interval = "300"`
The monitor interval is defined as the wait time 'between' sync's when running in monitor mode. By default without configuration, the monitor_interval is set to 45 seconds. Setting this value to 300 will run the sync process every 5 minutes.
### min_notif_changes
Example: `min_notif_changes = "5"`
### min_notify_changes
Example: `min_notify_changes = "5"`
This option defines the minimum number of pending incoming changes necessary to trigger a desktop notification. This allows controlling the frequency of notifications.

2
config
View file

@ -25,6 +25,6 @@
# skip_dotfiles = "false"
# dry_run = "false"
# monitor_interval = "45"
# min_notif_changes = "5"
# min_notify_changes = "5"
# monitor_log_frequency = "5"
# monitor_fullscan_frequency = "10"

View file

@ -98,7 +98,7 @@ Configuration file key: \fBlog_dir\fP (default: \fB/var/log/onedrive/\fP)
the minimum number of pending incoming changes necessary to trigger
a desktop notification
.br
Configuration file key: \fBmin_notif_changes\fP (default: \fB5\fP)
Configuration file key: \fBmin_notify_changes\fP (default: \fB5\fP)
.TP
\fB\-m \-\-monitor\fP
Keep monitoring for local and remote changes

View file

@ -48,7 +48,7 @@ final class Config
boolValues["dry_run"] = false;
longValues["verbose"] = log.verbose; // might be initialized by the first getopt call!
longValues["monitor_interval"] = 45,
longValues["min_notif_changes"] = 5;
longValues["min_notify_changes"] = 5;
longValues["monitor_log_frequency"] = 5;
// Number of n sync runs before performing a full local scan of sync_dir
// By default 10 which means every ~7.5 minutes a full disk scan of sync_dir will occur
@ -220,7 +220,7 @@ final class Config
&boolValues["logout"],
"min-notif-changes",
"Minimum number of pending incoming changes necessary to trigger a desktop notification",
&longValues["min_notif_changes"],
&longValues["min_notify_changes"],
"monitor|m",
"Keep monitoring for local and remote changes",
&boolValues["monitor"],

View file

@ -169,7 +169,7 @@ int main(string[] args)
writeln("Config option 'skip_dotfiles' = ", cfg.getValueBool("skip_dotfiles"));
writeln("Config option 'skip_symlinks' = ", cfg.getValueBool("skip_symlinks"));
writeln("Config option 'monitor_interval' = ", cfg.getValueLong("monitor_interval"));
writeln("Config option 'min_notif_changes' = ", cfg.getValueLong("min_notif_changes"));
writeln("Config option 'min_notify_changes' = ", cfg.getValueLong("min_notify_changes"));
writeln("Config option 'log_dir' = ", cfg.getValueString("log_dir"));
// Is config option drive_id configured?

View file

@ -627,7 +627,7 @@ final class SyncEngine
if (("value" in changes) != null) {
auto nrChanges = count(changes["value"].array);
if (nrChanges >= cfg.getValueLong("min_notif_changes")) {
if (nrChanges >= cfg.getValueLong("min_notify_changes")) {
log.logAndNotify("Processing ", nrChanges, " changes");
} else {
// There are valid changes