Hash worker for dau-dashboard. It runs media_hash
jobs from dau-dashboard's Oban queue (oban-py), hashes the media file with feluda's MediaHash, and enqueues a media_results job back for dau-dashboard.
dau-dashboard owns the database schema. Run its migrations (mix ecto.migrate) before starting
this worker; the worker refuses to start until the Oban tables exist.
Never run oban install or oban uninstall: dau-dashboard's migrations own the schema, and uninstall would also drop dau-dashboard's jobs.
uv sync
cp .env.example .env # then fill in the AWS valuesAWS_BUCKET must be the bucket dau-dashboard uploads media to.
uv run --env-file .env oban start--env-file loads .env before the command starts, in any shell.
docker build -t dau-worker .
docker run --env-file .env dau-workerInside a container, localhost in OBAN_DSN is the container itself. Point it at the
database host instead (for example the compose service name, or host.docker.internal).
uv run --env-file .env pytestThe schema contract test needs dau-dashboard's test database, migrated with
MIX_ENV=test mix ecto.migrate, and DAU_TEST_DSN set (see .env.example). Without it, that test
is skipped.