drop multi-node ssh execution, unify job runner to local + fix job completion atomicity

- remove nodes table, ssh service, nodes api, NodesPage route
- execute.ts: local-only spawn, atomic CAS job claim via UPDATE status
- wrap job done + subtitle_files insert + review_plans status in db transaction
- stream ffmpeg output per line with 500ms throttled flush
- bump version to 2026.04.13
This commit is contained in:
2026-04-13 07:25:19 +02:00
parent 1762f070a9
commit cdcb1ff706
12 changed files with 108 additions and 583 deletions
-17
View File
@@ -7,22 +7,6 @@ CREATE TABLE IF NOT EXISTS config (
value TEXT
);
CREATE TABLE IF NOT EXISTS nodes (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL UNIQUE,
host TEXT NOT NULL,
port INTEGER NOT NULL DEFAULT 22,
username TEXT NOT NULL,
private_key TEXT NOT NULL,
ffmpeg_path TEXT NOT NULL DEFAULT 'ffmpeg',
work_dir TEXT NOT NULL DEFAULT '/tmp',
movies_path TEXT NOT NULL DEFAULT '',
series_path TEXT NOT NULL DEFAULT '',
status TEXT NOT NULL DEFAULT 'unknown',
last_checked_at TEXT,
created_at TEXT NOT NULL DEFAULT (datetime('now'))
);
CREATE TABLE IF NOT EXISTS media_items (
id INTEGER PRIMARY KEY AUTOINCREMENT,
jellyfin_id TEXT NOT NULL UNIQUE,
@@ -104,7 +88,6 @@ CREATE TABLE IF NOT EXISTS jobs (
item_id INTEGER NOT NULL REFERENCES media_items(id) ON DELETE CASCADE,
command TEXT NOT NULL,
job_type TEXT NOT NULL DEFAULT 'audio',
node_id INTEGER REFERENCES nodes(id) ON DELETE SET NULL,
status TEXT NOT NULL DEFAULT 'pending',
output TEXT,
exit_code INTEGER,