feat(logs): store stderr and stdout with details in dedicated log messages table

This commit is contained in:
Matthieu Bessat 2024-07-25 23:23:58 +02:00
parent c40c6aedef
commit 55438fbd83
12 changed files with 155 additions and 27 deletions

View file

@ -5,8 +5,17 @@ CREATE TABLE task_runs (
status TEXT CHECK(status IN ('pending','running','failed','success')) NOT NULL DEFAULT 'pending',
trigger_mode TEXT CHECK(trigger_mode IN ('manual','webhook','schedule')) NOT NULL DEFAULT 'manual',
exit_code INT,
logs TEXT,
runtime_details JSON,
submitted_at DATETIME,
started_at DATETIME,
ended_at DATETIME
);
DROP TABLE IF EXISTS logs_lines;
CREATE TABLE logs_lines (
id TEXT PRIMARY KEY,
task_run_id TEXT NOT NULL,
kind TEXT CHECK(kind IN ('Stdout', 'Stderr')),
captured_at INT, -- unix timestamp
content TEXT
)