worker-download
main
ステップ6a: worker(ダウンロード本体)を追加する。登録番組の定期確認(6b)は範囲外。
cmd/worker
internal/worker
DATABASE_URL
VIDEO_DIR/.incoming/<job id>/
WORKER_CONCURRENCY
Dockerfile.worker
compose.yaml
PROJECT.md
go test -count=1 ./...
go test -race ./internal/worker
go vet
🤖 Generated with Claude Code
https://claude.ai/code/session_01BcuBr9DyfcqZY8xFQsY5Di
No dependencies set.
The note is not visible to the blocked user.
概要
ステップ6a: worker(ダウンロード本体)を追加する。登録番組の定期確認(6b)は範囲外。
cmd/worker・internal/worker: 起動時にDATABASE_URL必須・Migrate・RequeueStale。ClaimNext → yt-dlp → 段階別進捗(段階変更は即時、同一段階は 1 秒に間引き)→ after_move の実パス → ffprobe(MP4・H.264・AAC)→ ファイル名規則の場所へ rename → CompleteVIDEO_DIR/.incoming/<job id>/に ID 名で取得して Go 側で移動。すべての終了経路で作業ディレクトリを片付ける。after_move は通常ファイルかつ実体が作業ディレクトリ内のものだけ受理WORKER_CONCURRENCYで 2 まで)。移動先の同名ファイルは上書き(冪等)Dockerfile.worker(yt-dlp[default] 2026.08.19 を ARG 固定、ffmpeg/ffprobe、非 root)、compose.yamlに worker、PROJECT.mdを更新確認
go test -count=1 ./...→ 161件成功・0失敗、go test -race ./internal/worker競合なし、go vet指摘0件Dockerfile.workerをビルドし、非 root・yt-dlp 2026.08.19・pycryptodomex 3.23.0・ffmpeg/ffprobe 7.1.5 を確認🤖 Generated with Claude Code
https://claude.ai/code/session_01BcuBr9DyfcqZY8xFQsY5Di