mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-05 23:43:16 +02:00
Update 'min_notif_changes' to 'min_notify_changes' (#467)
* Update 'min_notif_changes' to 'min_notify_changes'
This commit is contained in:
parent
521cf33001
commit
25d2f7284f
|
@ -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
2
config
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -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?
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue