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
| Role | Runs |
|---|---|
all | Everything below |
steps | Every processing step |
step:<name> | One processing step (names below) |
albums | Keeping albums' rule picks current |
people | Placing new faces with people, and merging alike suggestions |
places | Putting media in places by where they were taken |
Step names
| Role | Step | Needs |
|---|---|---|
step:metadata | File details | The worker's CPU |
step:renditions | Thumbnails | The worker's CPU |
step:analysis | Image analysis | The worker's CPU |
step:visual | Image embedding | The models server |
step:duplicates | Duplicate check | The database |
step:tagging | Tagging | The models server |
step:nsfw | NSFW check | The models server |
step:text | Text in image | Vision, then the models server |
step:faces | Faces | The vision service |
step:description | Description | The models server |
step:title | Title | The models server |
step:embedding | Embedding | The models server |
Processing steps explains each one.
Examples
# 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.