(delete-old-journals! dir {snapshot-count :snapshot-count-to-make-space-for})Deletes old journal files to make space for new snapshots. Deletes nothing when there are no snapshots. Only journals older (smaller file number) than the oldest snapshot are deleted, oldest first, and only as many as necessary to make room for the given number of snapshots the size of the newest one. Receives options with the number of snapshots to make space for. Example: {:snapshot-count-to-make-space-for 3}
Deletes old journal files to make space for new snapshots.
Deletes nothing when there are no snapshots. Only journals older (smaller file number) than the oldest
snapshot are deleted, oldest first, and only as many as necessary to make room for the given number of
snapshots the size of the newest one.
Receives options with the number of snapshots to make space for. Example: {:snapshot-count-to-make-space-for 3}(delete-old-snapshots! dir {max-snapshots-to-keep :keep})Deletes all snapshot .part files and deletes all but the newest snapshot files. Receives options with the number of snapshot files to keep. Example: {:keep 3}
Deletes all snapshot .part files and deletes all but the newest snapshot files.
Receives options with the number of snapshot files to keep. Example: {:keep 3}(files-to-delete max-files-to-keep files & [last-modified-fn])Internal use only. Receives: max-files-to-keep: number of files to keep files: seq of files candidates for deletion last-modified-fn: an optional override to be used instead of .lastModified (for tests) Keeps the newest file for each month for the last max-files-to-keep months. Keeps the oldest file overall if there are less months than max-files-to-keep. Returns seq of files to delete (the ones not kept above).
Internal use only. Receives: max-files-to-keep: number of files to keep files: seq of files candidates for deletion last-modified-fn: an optional override to be used instead of .lastModified (for tests) Keeps the newest file for each month for the last max-files-to-keep months. Keeps the oldest file overall if there are less months than max-files-to-keep. Returns seq of files to delete (the ones not kept above).
(journals-to-delete dir bytes-needed bytes-usable oldest-snapshot-number)Internal use only. Receives: dir: the prevayler directory bytes-needed: number of bytes that must be free bytes-usable: number of bytes currently free (received instead of read from dir, for easier testing) oldest-snapshot-number: only journals with a smaller file number are candidates Returns seq of journals to delete, oldest first: just enough of them to make bytes-needed available.
Internal use only. Receives: dir: the prevayler directory bytes-needed: number of bytes that must be free bytes-usable: number of bytes currently free (received instead of read from dir, for easier testing) oldest-snapshot-number: only journals with a smaller file number are candidates Returns seq of journals to delete, oldest first: just enough of them to make bytes-needed available.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |