diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-12-28 14:42:44 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-12-28 14:42:44 -0500 |
commit | cd376fd88f5b034b549d3de47815f4225fe240c5 (patch) | |
tree | fd990489ccec709df58e9647ca2495ee1fd29ddd /bin | |
parent | 7326268f6ef6653fe5c54e86d47ff068036779a6 (diff) | |
download | conf-cd376fd88f5b034b549d3de47815f4225fe240c5.tar.gz conf-cd376fd88f5b034b549d3de47815f4225fe240c5.zip |
be slightly more aggressive about syncing
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/mbsyncloop | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/mbsyncloop b/bin/mbsyncloop index 3136c51..6b682bd 100755 --- a/bin/mbsyncloop +++ b/bin/mbsyncloop @@ -32,11 +32,13 @@ if (!$pid) { exit; } -my $i = 0; +my $last = 0; while (1) { - my $channel = $i % 15 ? "priority" : "all"; + my $now = time; + my $channel = ($now - $last) > 15 * 60 ? "all" : "priority"; + $last = $now; + system("mbsync -c ~/.mbsyncloop $channel") and last; system("notmuch new") and last; - sleep 60; - $i++; + sleep 60 - (time - $now); } |