This commit is contained in:
Louis Knight-Webb
2025-06-20 22:39:06 +01:00
parent f777b438f5
commit 9c06c7fab3
18 changed files with 1129 additions and 209 deletions

View File

@@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "DELETE FROM execution_processes WHERE task_attempt_id = $1",
"describe": {
"columns": [],
"parameters": {
"Right": 1
},
"nullable": []
},
"hash": "1268afe9ca849daa6722e3df7ca8e9e61f0d37052e782bb5452ab8e1018d9b63"
}

View File

@@ -0,0 +1,98 @@
{
"db_name": "SQLite",
"query": "SELECT \n id as \"id!: Uuid\", \n task_attempt_id as \"task_attempt_id!: Uuid\", \n process_type as \"process_type!: ExecutionProcessType\",\n status as \"status!: ExecutionProcessStatus\",\n command, \n args, \n working_directory, \n stdout, \n stderr, \n exit_code,\n started_at as \"started_at!: DateTime<Utc>\",\n completed_at as \"completed_at?: DateTime<Utc>\",\n created_at as \"created_at!: DateTime<Utc>\", \n updated_at as \"updated_at!: DateTime<Utc>\"\n FROM execution_processes \n WHERE task_attempt_id = $1 \n ORDER BY created_at ASC",
"describe": {
"columns": [
{
"name": "id!: Uuid",
"ordinal": 0,
"type_info": "Blob"
},
{
"name": "task_attempt_id!: Uuid",
"ordinal": 1,
"type_info": "Blob"
},
{
"name": "process_type!: ExecutionProcessType",
"ordinal": 2,
"type_info": "Text"
},
{
"name": "status!: ExecutionProcessStatus",
"ordinal": 3,
"type_info": "Text"
},
{
"name": "command",
"ordinal": 4,
"type_info": "Text"
},
{
"name": "args",
"ordinal": 5,
"type_info": "Text"
},
{
"name": "working_directory",
"ordinal": 6,
"type_info": "Text"
},
{
"name": "stdout",
"ordinal": 7,
"type_info": "Text"
},
{
"name": "stderr",
"ordinal": 8,
"type_info": "Text"
},
{
"name": "exit_code",
"ordinal": 9,
"type_info": "Integer"
},
{
"name": "started_at!: DateTime<Utc>",
"ordinal": 10,
"type_info": "Text"
},
{
"name": "completed_at?: DateTime<Utc>",
"ordinal": 11,
"type_info": "Text"
},
{
"name": "created_at!: DateTime<Utc>",
"ordinal": 12,
"type_info": "Text"
},
{
"name": "updated_at!: DateTime<Utc>",
"ordinal": 13,
"type_info": "Text"
}
],
"parameters": {
"Right": 1
},
"nullable": [
true,
false,
false,
false,
false,
true,
false,
true,
true,
true,
false,
true,
false,
false
]
},
"hash": "14ad9267623a3aa678a943db6d0b14581a6d353da673c9e4156e0bbeac0b3346"
}

View File

@@ -0,0 +1,98 @@
{
"db_name": "SQLite",
"query": "SELECT \n id as \"id!: Uuid\", \n task_attempt_id as \"task_attempt_id!: Uuid\", \n process_type as \"process_type!: ExecutionProcessType\",\n status as \"status!: ExecutionProcessStatus\",\n command, \n args, \n working_directory, \n stdout, \n stderr, \n exit_code,\n started_at as \"started_at!: DateTime<Utc>\",\n completed_at as \"completed_at?: DateTime<Utc>\",\n created_at as \"created_at!: DateTime<Utc>\", \n updated_at as \"updated_at!: DateTime<Utc>\"\n FROM execution_processes \n WHERE id = $1",
"describe": {
"columns": [
{
"name": "id!: Uuid",
"ordinal": 0,
"type_info": "Blob"
},
{
"name": "task_attempt_id!: Uuid",
"ordinal": 1,
"type_info": "Blob"
},
{
"name": "process_type!: ExecutionProcessType",
"ordinal": 2,
"type_info": "Text"
},
{
"name": "status!: ExecutionProcessStatus",
"ordinal": 3,
"type_info": "Text"
},
{
"name": "command",
"ordinal": 4,
"type_info": "Text"
},
{
"name": "args",
"ordinal": 5,
"type_info": "Text"
},
{
"name": "working_directory",
"ordinal": 6,
"type_info": "Text"
},
{
"name": "stdout",
"ordinal": 7,
"type_info": "Text"
},
{
"name": "stderr",
"ordinal": 8,
"type_info": "Text"
},
{
"name": "exit_code",
"ordinal": 9,
"type_info": "Integer"
},
{
"name": "started_at!: DateTime<Utc>",
"ordinal": 10,
"type_info": "Text"
},
{
"name": "completed_at?: DateTime<Utc>",
"ordinal": 11,
"type_info": "Text"
},
{
"name": "created_at!: DateTime<Utc>",
"ordinal": 12,
"type_info": "Text"
},
{
"name": "updated_at!: DateTime<Utc>",
"ordinal": 13,
"type_info": "Text"
}
],
"parameters": {
"Right": 1
},
"nullable": [
true,
false,
false,
false,
false,
true,
false,
true,
true,
true,
false,
true,
false,
false
]
},
"hash": "1ada5613889792cd6098da71ce2ba1ecdee7e5dc2ff8196872368fff0caa48d8"
}

View File

@@ -1,56 +0,0 @@
{
"db_name": "SQLite",
"query": "SELECT id as \"id!: Uuid\", project_id as \"project_id!: Uuid\", title, description, status as \"status!: TaskStatus\", created_at as \"created_at!: DateTime<Utc>\", updated_at as \"updated_at!: DateTime<Utc>\"\n FROM tasks \n WHERE project_id = $1 \n ORDER BY created_at DESC",
"describe": {
"columns": [
{
"name": "id!: Uuid",
"ordinal": 0,
"type_info": "Blob"
},
{
"name": "project_id!: Uuid",
"ordinal": 1,
"type_info": "Blob"
},
{
"name": "title",
"ordinal": 2,
"type_info": "Text"
},
{
"name": "description",
"ordinal": 3,
"type_info": "Text"
},
{
"name": "status!: TaskStatus",
"ordinal": 4,
"type_info": "Text"
},
{
"name": "created_at!: DateTime<Utc>",
"ordinal": 5,
"type_info": "Text"
},
{
"name": "updated_at!: DateTime<Utc>",
"ordinal": 6,
"type_info": "Text"
}
],
"parameters": {
"Right": 1
},
"nullable": [
true,
false,
false,
true,
false,
false,
false
]
},
"hash": "2c1e9b7c0038a44d9b78791538529107aeaa6bd49501316b67dceb908df873a1"
}

View File

@@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "UPDATE execution_processes SET stderr = COALESCE(stderr, '') || $1, updated_at = datetime('now') WHERE id = $2",
"describe": {
"columns": [],
"parameters": {
"Right": 2
},
"nullable": []
},
"hash": "36c9e3dd10648e94b949db5c91a774ecb1e10a899ef95da74066eccedca4d8b2"
}

View File

@@ -1,20 +0,0 @@
{
"db_name": "SQLite",
"query": "SELECT DISTINCT ta.id as \"id!: Uuid\"\n FROM task_attempts ta\n INNER JOIN (\n SELECT task_attempt_id, MAX(created_at) as latest_created_at\n FROM task_attempt_activities\n GROUP BY task_attempt_id\n ) latest_activity ON ta.id = latest_activity.task_attempt_id\n INNER JOIN task_attempt_activities taa ON ta.id = taa.task_attempt_id \n AND taa.created_at = latest_activity.latest_created_at\n WHERE taa.status IN ($1, $2, $3)",
"describe": {
"columns": [
{
"name": "id!: Uuid",
"ordinal": 0,
"type_info": "Blob"
}
],
"parameters": {
"Right": 3
},
"nullable": [
true
]
},
"hash": "52c58db6e8a3b690a8980e395733a6e44bc5b0836eab8801e4c43cb47560ca41"
}

View File

@@ -1,12 +0,0 @@
{
"db_name": "SQLite",
"query": "UPDATE task_attempts SET stdout = $1, stderr = $2, updated_at = datetime('now') WHERE id = $3",
"describe": {
"columns": [],
"parameters": {
"Right": 3
},
"nullable": []
},
"hash": "aa7c3034f96c9b2dfd7c1121b9eb7749987b035d603480a8bf15f776d83a0363"
}

View File

@@ -0,0 +1,98 @@
{
"db_name": "SQLite",
"query": "INSERT INTO execution_processes (\n id, task_attempt_id, process_type, status, command, args, \n working_directory, stdout, stderr, exit_code, started_at, \n completed_at, created_at, updated_at\n ) \n VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) \n RETURNING \n id as \"id!: Uuid\", \n task_attempt_id as \"task_attempt_id!: Uuid\", \n process_type as \"process_type!: ExecutionProcessType\",\n status as \"status!: ExecutionProcessStatus\",\n command, \n args, \n working_directory, \n stdout, \n stderr, \n exit_code,\n started_at as \"started_at!: DateTime<Utc>\",\n completed_at as \"completed_at?: DateTime<Utc>\",\n created_at as \"created_at!: DateTime<Utc>\", \n updated_at as \"updated_at!: DateTime<Utc>\"",
"describe": {
"columns": [
{
"name": "id!: Uuid",
"ordinal": 0,
"type_info": "Blob"
},
{
"name": "task_attempt_id!: Uuid",
"ordinal": 1,
"type_info": "Blob"
},
{
"name": "process_type!: ExecutionProcessType",
"ordinal": 2,
"type_info": "Text"
},
{
"name": "status!: ExecutionProcessStatus",
"ordinal": 3,
"type_info": "Text"
},
{
"name": "command",
"ordinal": 4,
"type_info": "Text"
},
{
"name": "args",
"ordinal": 5,
"type_info": "Text"
},
{
"name": "working_directory",
"ordinal": 6,
"type_info": "Text"
},
{
"name": "stdout",
"ordinal": 7,
"type_info": "Text"
},
{
"name": "stderr",
"ordinal": 8,
"type_info": "Text"
},
{
"name": "exit_code",
"ordinal": 9,
"type_info": "Integer"
},
{
"name": "started_at!: DateTime<Utc>",
"ordinal": 10,
"type_info": "Text"
},
{
"name": "completed_at?: DateTime<Utc>",
"ordinal": 11,
"type_info": "Text"
},
{
"name": "created_at!: DateTime<Utc>",
"ordinal": 12,
"type_info": "Text"
},
{
"name": "updated_at!: DateTime<Utc>",
"ordinal": 13,
"type_info": "Text"
}
],
"parameters": {
"Right": 14
},
"nullable": [
true,
false,
false,
false,
false,
true,
false,
true,
true,
true,
false,
true,
false,
false
]
},
"hash": "b50af42f635dec3167508f3c4f81d03911102a603ac94b22a431a513d36471b0"
}

View File

@@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "UPDATE execution_processes \n SET status = $1, exit_code = $2, completed_at = $3, updated_at = datetime('now') \n WHERE id = $4",
"describe": {
"columns": [],
"parameters": {
"Right": 4
},
"nullable": []
},
"hash": "c67259be8bf4ee0cfd32167b2aa3b7fe9192809181a8171bf1c2d6df731967ae"
}

View File

@@ -0,0 +1,98 @@
{
"db_name": "SQLite",
"query": "SELECT \n id as \"id!: Uuid\", \n task_attempt_id as \"task_attempt_id!: Uuid\", \n process_type as \"process_type!: ExecutionProcessType\",\n status as \"status!: ExecutionProcessStatus\",\n command, \n args, \n working_directory, \n stdout, \n stderr, \n exit_code,\n started_at as \"started_at!: DateTime<Utc>\",\n completed_at as \"completed_at?: DateTime<Utc>\",\n created_at as \"created_at!: DateTime<Utc>\", \n updated_at as \"updated_at!: DateTime<Utc>\"\n FROM execution_processes \n WHERE status = 'running' \n ORDER BY created_at ASC",
"describe": {
"columns": [
{
"name": "id!: Uuid",
"ordinal": 0,
"type_info": "Blob"
},
{
"name": "task_attempt_id!: Uuid",
"ordinal": 1,
"type_info": "Blob"
},
{
"name": "process_type!: ExecutionProcessType",
"ordinal": 2,
"type_info": "Text"
},
{
"name": "status!: ExecutionProcessStatus",
"ordinal": 3,
"type_info": "Text"
},
{
"name": "command",
"ordinal": 4,
"type_info": "Text"
},
{
"name": "args",
"ordinal": 5,
"type_info": "Text"
},
{
"name": "working_directory",
"ordinal": 6,
"type_info": "Text"
},
{
"name": "stdout",
"ordinal": 7,
"type_info": "Text"
},
{
"name": "stderr",
"ordinal": 8,
"type_info": "Text"
},
{
"name": "exit_code",
"ordinal": 9,
"type_info": "Integer"
},
{
"name": "started_at!: DateTime<Utc>",
"ordinal": 10,
"type_info": "Text"
},
{
"name": "completed_at?: DateTime<Utc>",
"ordinal": 11,
"type_info": "Text"
},
{
"name": "created_at!: DateTime<Utc>",
"ordinal": 12,
"type_info": "Text"
},
{
"name": "updated_at!: DateTime<Utc>",
"ordinal": 13,
"type_info": "Text"
}
],
"parameters": {
"Right": 0
},
"nullable": [
true,
false,
false,
false,
false,
true,
false,
true,
true,
true,
false,
true,
false,
false
]
},
"hash": "d25396768d88ecab6e13ad9fca8e8c46e92ff17474ebd24657384e130c49afa8"
}

View File

@@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "UPDATE execution_processes SET stdout = COALESCE(stdout, '') || $1, updated_at = datetime('now') WHERE id = $2",
"describe": {
"columns": [],
"parameters": {
"Right": 2
},
"nullable": []
},
"hash": "ed8456646fa69ddd412441955f06ff22bfb790f29466450735e0b8bb1bc4ec94"
}