feat(backend): implement job storage; tie everything up
ci-agent / build (push) Failing after 1m55s

This commit is contained in:
2026-04-04 05:09:16 +03:00
parent f578b6eb51
commit c5e35b4c12
5 changed files with 209 additions and 33 deletions
+14
View File
@@ -25,6 +25,20 @@ CREATE TABLE IF NOT EXISTS registration_tokens (
);
`
const CreateJobsTable = `
CREATE TABLE IF NOT EXISTS jobs (
id INTEGER PRIMARY KEY AUTOINCREMENT,
agent_id TEXT NOT NULL,
command TEXT NOT NULL,
stdin TEXT,
stdout TEXT DEFAULT '',
stderr TEXT DEFAULT '',
status INTEGER DEFAULT 0,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
`
const CreateLogsTable = `
CREATE TABLE IF NOT EXISTS logs (
timestamp DateTime64(3) DEFAULT now(),