jobs: add mode and exit_code columns (phase 1a)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE "pipeline_jobs" ADD COLUMN "mode" text DEFAULT 'pipeline' NOT NULL;--> statement-breakpoint
|
||||
ALTER TABLE "pipeline_jobs" ADD COLUMN "exit_code" integer;
|
||||
File diff suppressed because it is too large
Load Diff
@@ -36,6 +36,13 @@
|
||||
"when": 1784593790333,
|
||||
"tag": "0004_true_annihilus",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 5,
|
||||
"version": "7",
|
||||
"when": 1784813792772,
|
||||
"tag": "0005_small_the_phantom",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -6,6 +6,8 @@ export const pipelineJobs = pgTable('pipeline_jobs', {
|
||||
userId: integer('user_id').notNull().references(() => users.id, { onDelete: 'cascade' }),
|
||||
taskDirName: text('task_dir_name').notNull(),
|
||||
taskName: text('task_name').notNull(),
|
||||
// Job kind — pipeline (multi-step agentic), script (single bash/py/ts task), later agentic.
|
||||
mode: text('mode', { enum: ['pipeline', 'script', 'agentic'] }).notNull().default('pipeline'),
|
||||
status: text('status', { enum: ['pending', 'running', 'completed', 'failed', 'stopped', 'interrupted'] }).notNull().default('pending'),
|
||||
inputs: jsonb('inputs').notNull().default({}),
|
||||
cwd: text('cwd'),
|
||||
@@ -13,6 +15,8 @@ export const pipelineJobs = pgTable('pipeline_jobs', {
|
||||
progress: jsonb('progress'),
|
||||
totalCost: jsonb('total_cost'),
|
||||
error: text('error'),
|
||||
// Script jobs: the process exit code (null until finished / for non-script jobs).
|
||||
exitCode: integer('exit_code'),
|
||||
createdAt: timestamp('created_at', { withTimezone: true }).notNull().defaultNow(),
|
||||
startedAt: timestamp('started_at', { withTimezone: true }),
|
||||
completedAt: timestamp('completed_at', { withTimezone: true }),
|
||||
|
||||
Reference in New Issue
Block a user