Skip to main content

Module startup_scan

Module startup_scan 

Source
Expand description

Performs a startup catch-up scan for files that were missed while Mimick was not running.

The scan runs in two stages:

  1. Enumerate (parallel, sync) – uses rayon to walk all watch paths concurrently, collecting candidate files with their filesystem fingerprints.
  2. Decide + queue (bounded async) – resolves album IDs, checks the sync index, hashes only when needed, and queues uploads with bounded concurrency.

StructsΒ§

ScanCandidate πŸ”’
A file discovered during the parallel enumeration stage.

FunctionsΒ§

effective_album_name πŸ”’
Resolve the effective album name for a file using per-folder configuration.
enumerate_candidates πŸ”’
Stage 1: Walk all watch paths in parallel using rayon.
execute_reconcile_diff πŸ”’
filter_and_reassociate_existing πŸ”’
find_album_asset_id_by_checksum πŸ”’
Find the remote asset ID matching the given checksum inside an album.
hash_to_task πŸ”’
Hash a candidate file and submit it to the upload queue.
process_reassociation πŸ”’
prune_index_entries_for_missing_files πŸ”’
queue_unsynced_files
Scans watch folders at startup and queues new, changed, or retargeted files for upload.
reconcile_entry
Reconcile a single watch entry against its remote album: download new items, trash local files removed from the album, and trash remote items missing locally β€” gated by the entry’s per-folder rules.
resolve_album πŸ”’
Resolve an album ID, creating the album if it doesn’t exist yet. Caches the result for reuse by other candidates in the same folder.
resolve_album_ids_for_candidates πŸ”’
should_skip_for_catchup πŸ”’
sync_album_to_folder_entries πŸ”’
Parallel reconcile for each watch path entry against their remote albums.
trash_remote_asset_by_checksum πŸ”’
Locate and move a remote asset to Immich trash by looking up its checksum in an album.
trash_remote_assets_for_missing_local_files πŸ”’
Trash remote Immich assets when their corresponding local file has been removed.