3 Commits
1 ... 4

Author SHA1 Message Date
Hermes Agent 72aa501a47 fix: V1__init.sql приведён к api-версии (uq_jobs_active_item), jackson-exclude из webmvc
Build Media Mirror Worker / Build and publish (release) Successful in 1m36s
2026-08-10 23:43:11 +03:00
Hermes Agent 91642e4933 fix: убран кривой mainClass (WorkerApplication → WorkerApplicationKt автоматически)
Build Media Mirror Worker / Build and publish (release) Successful in 1m34s
2026-08-10 23:37:36 +03:00
Hermes Agent 5dd324e79d db: отдельная база media_mirror вместо glasses
Build Media Mirror Worker / Build and publish (release) Successful in 1m28s
2026-08-10 18:06:44 +03:00
4 changed files with 15 additions and 23 deletions
+3 -12
View File
@@ -24,13 +24,6 @@ kotlin {
configurations { configurations {
named("runtimeClasspath") { named("runtimeClasspath") {
exclude(group = "tools.jackson.core")
exclude(group = "tools.jackson.databind")
exclude(group = "com.fasterxml.jackson.core")
exclude(group = "com.fasterxml.jackson.databind")
exclude(group = "com.fasterxml.jackson.datatype")
exclude(group = "com.fasterxml.jackson.dataformat")
exclude(group = "com.fasterxml.jackson.module")
} }
} }
@@ -45,7 +38,9 @@ configurations.all {
dependencies { dependencies {
implementation(platform("org.springframework.boot:spring-boot-dependencies:4.1.0")) implementation(platform("org.springframework.boot:spring-boot-dependencies:4.1.0"))
implementation("org.springframework.boot:spring-boot-starter-webmvc") implementation("org.springframework.boot:spring-boot-starter-webmvc") {
exclude(group = "org.springframework.boot", module = "spring-boot-starter-jackson")
}
implementation("org.springframework.boot:spring-boot-starter-jdbc") implementation("org.springframework.boot:spring-boot-starter-jdbc")
implementation("org.springframework.boot:spring-boot-starter-flyway") implementation("org.springframework.boot:spring-boot-starter-flyway")
implementation("org.flywaydb:flyway-database-postgresql") implementation("org.flywaydb:flyway-database-postgresql")
@@ -65,10 +60,6 @@ dependencies {
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.10.2") testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.10.2")
} }
springBoot {
mainClass = "pw.binom.mirror.worker.WorkerApplication"
}
tasks.withType<Test> { tasks.withType<Test> {
useJUnitPlatform() useJUnitPlatform()
maxParallelForks = 1 maxParallelForks = 1
+1 -1
View File
@@ -17,7 +17,7 @@ image:
db: db:
host: null host: null
port: 5432 port: 5432
name: glasses name: media_mirror
user: null user: null
password: null password: null
maxConnections: 10 maxConnections: 10
+1 -1
View File
@@ -2,7 +2,7 @@ spring:
application: application:
name: media-mirror-worker name: media-mirror-worker
datasource: datasource:
url: jdbc:postgresql://192.168.76.106:5432/glasses url: jdbc:postgresql://192.168.76.106:5432/media_mirror
username: postgres username: postgres
password: postgres password: postgres
flyway: flyway:
+10 -9
View File
@@ -1,18 +1,19 @@
CREATE SCHEMA IF NOT EXISTS media_mirror; CREATE SCHEMA IF NOT EXISTS media_mirror;
CREATE TABLE media_mirror.jobs (
CREATE TABLE IF NOT EXISTS media_mirror.jobs (
id uuid PRIMARY KEY DEFAULT gen_random_uuid(), id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
item_id text NOT NULL, item_id text NOT NULL, -- itemId из Jellyfin
source_url text NOT NULL, source_url text NOT NULL, -- URL исходника (jellyfin stream)
source_type text NOT NULL DEFAULT 'jellyfin', source_type text NOT NULL DEFAULT 'jellyfin',
status text NOT NULL DEFAULT 'new', status text NOT NULL DEFAULT 'new', -- new | processing | done | failed | cancelled
progress int NOT NULL DEFAULT 0, progress int NOT NULL DEFAULT 0, -- 0..100
video_key text, video_key text, -- S3-ключ видео (после done)
audio_keys jsonb, audio_keys jsonb, -- [{key, title, language, index}]
error text, error text,
created_at timestamptz NOT NULL DEFAULT now(), created_at timestamptz NOT NULL DEFAULT now(),
updated_at timestamptz NOT NULL DEFAULT now(), updated_at timestamptz NOT NULL DEFAULT now(),
taken_at timestamptz taken_at timestamptz
); );
CREATE INDEX IF NOT EXISTS idx_jobs_status ON media_mirror.jobs (status, created_at); CREATE INDEX IF NOT EXISTS idx_jobs_status ON media_mirror.jobs (status, created_at);
CREATE UNIQUE INDEX IF NOT EXISTS uq_jobs_active_item
ON media_mirror.jobs (item_id)
WHERE status NOT IN ('failed', 'cancelled');