Reference

Worker roles

Every value WORKER_ROLES takes, and what each runs.

WORKER_ROLES says what a worker container runs, as a comma-separated list. Unset, empty, or all: everything. See Scaling for how to use several workers.

Roles

RoleRuns
allEverything below
stepsEvery processing step
step:<name>One processing step (names below)
albumsKeeping albums' rule picks current
peoplePlacing new faces with people, and merging alike suggestions
placesPutting media in places by where they were taken

Step names

RoleStepNeeds
step:metadataFile detailsThe worker's CPU
step:renditionsThumbnailsThe worker's CPU
step:analysisImage analysisThe worker's CPU
step:visualImage embeddingThe models server
step:duplicatesDuplicate checkThe database
step:taggingTaggingThe models server
step:nsfwNSFW checkThe models server
step:textText in imageVision, then the models server
step:facesFacesThe vision service
step:descriptionDescriptionThe models server
step:titleTitleThe models server
step:embeddingEmbeddingThe models server

Processing steps explains each one.

Examples

.env
# Everything (the default)
WORKER_ROLES=all

# Only the steps that run on the CPU
WORKER_ROLES=step:metadata,step:renditions,step:analysis,step:duplicates

# Only the classifier's steps
WORKER_ROLES=step:tagging,step:nsfw

# Everything but the steps
WORKER_ROLES=albums,people,places

A role the worker doesn't know stops it at start, with a message listing the valid ones. The worker logs its roles when it starts.

Sharing roles

Any number of workers can share a role. Taking work is race-safe: each media's step is claimed with a conditional write that only one worker can win, and longer runs hold a lease.