feat: media-mirror-worker — воркер конвертации зеркал (очередь Postgres, ядро из media-transformer)

- очередь: jobs в схеме media_mirror, SELECT ... FOR UPDATE SKIP LOCKED, stale-возврат
- ядро перенесено из media-transformer (FfmpegService, FfprobeService, JellyfinInput, S3Input, OutputService...)
- Spring Boot 4.1.0, Kotlin 2.4.10, kotlinx-serialization 1.11.0, NATS выпилен
- тесты: 45 (SKIP LOCKED параллельный, конец-в-конец до done, конвертация 480p+2 аудио), LINE 93%
This commit is contained in:
Hermes Agent
2026-08-10 17:29:42 +03:00
parent dd62744e02
commit 5ad865715e
46 changed files with 2851 additions and 0 deletions
@@ -0,0 +1,18 @@
CREATE SCHEMA IF NOT EXISTS media_mirror;
CREATE TABLE IF NOT EXISTS media_mirror.jobs (
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
item_id text NOT NULL,
source_url text NOT NULL,
source_type text NOT NULL DEFAULT 'jellyfin',
status text NOT NULL DEFAULT 'new',
progress int NOT NULL DEFAULT 0,
video_key text,
audio_keys jsonb,
error text,
created_at timestamptz NOT NULL DEFAULT now(),
updated_at timestamptz NOT NULL DEFAULT now(),
taken_at timestamptz
);
CREATE INDEX IF NOT EXISTS idx_jobs_status ON media_mirror.jobs (status, created_at);