quak backup no longer refreshes its library on a timer (closes #183)
check / check (push) Waiting to run
check / check (push) Waiting to run
The backup opened its library with the default 3-second refresh interval, so for its whole run it asked the server for changes every few seconds, and each refresh started another ML data pass. It now opens it with refreshIntervalSeconds: Infinity. The library takes Infinity as no background timer, since setTimeout would turn it into 1 ms. A refresh interval of 3600, as the read commands use, would still refresh once an hour in a backup that runs for hours. Model: opus-5-5
This commit is contained in:
@@ -781,7 +781,8 @@ subsequent runs, existing originals are skipped. If a download fails, the error
|
||||
is logged and the backup continues with the next file. The exit code is non-zero
|
||||
if any files failed. `quak backup` opens its library with the thumbnail and
|
||||
originals precache off, so the only file content it fetches is the originals the
|
||||
backup stores.
|
||||
backup stores. It also opens it with no background timer, so it asks the server
|
||||
for changes only as it starts, not again while it downloads.
|
||||
|
||||
With `--verify`, or `lib.backup({ verify: true })`, a run also hashes each
|
||||
original already at its save path the way a download is checked (see "On-disk
|
||||
@@ -861,7 +862,7 @@ background, so an unreachable server does not block opening.
|
||||
| `client` | required | the account client (a `Client`, or any `LibraryClient`) |
|
||||
| `cacheDirectory` | `quak/<userID>` under the per-user cache directory | where `metadata.json` and the content cache live |
|
||||
| `downloadDirectory` | `photos` in the working directory | root of the save paths; an original stored there counts as cached |
|
||||
| `refreshIntervalSeconds` | `3` | background refresh cadence |
|
||||
| `refreshIntervalSeconds` | `3` | background refresh cadence; `Infinity` for no background timer |
|
||||
| `precacheThumbnails` | `true` | prefetch every thumbnail, newest first |
|
||||
| `precacheOriginals` | `true` | prefetch the favorites album and the latest-window originals |
|
||||
| `precacheOriginalsDays` | `7` | length in days of that latest window |
|
||||
|
||||
Reference in New Issue
Block a user