Files
artcraft-services/.sqlx/query-ed8d32dd94719ad6479dd638cdc7a8cfbf725785f51678533988ddba94aac112.json

70 lines
2.4 KiB
JSON

{
"db_name": "MySQL",
"query": "\nSELECT\n IFNULL((\n SELECT\n NOW() - t1.created_at AS seconds_since_first\n FROM tts_inference_jobs AS t1\n WHERE t1.status = \"pending\"\n ORDER BY t1.id ASC\n LIMIT 1\n ), 0) as seconds_since_first,\n sub2.pending_count,\n sub3.pending_priority_nonzero_count,\n sub4.pending_priority_gt_one_count,\n sub5.attempt_failed_count\nFROM\n (\n SELECT\n count(t2.id) as pending_count\n FROM tts_inference_jobs AS t2\n WHERE t2.status = \"pending\"\n ) as sub2,\n (\n SELECT\n count(t3.id) as pending_priority_nonzero_count\n FROM tts_inference_jobs AS t3\n WHERE t3.status = \"pending\"\n AND t3.priority_level > 0\n ) as sub3,\n (\n SELECT\n count(t4.id) as pending_priority_gt_one_count\n FROM tts_inference_jobs AS t4\n WHERE t4.status = \"pending\"\n AND t4.priority_level > 1\n ) as sub4,\n (\n SELECT\n count(t5.id) as attempt_failed_count\n FROM tts_inference_jobs AS t5\n WHERE t5.status = \"attempt_failed\"\n ) as sub5\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "seconds_since_first",
"type_info": {
"type": "LongLong",
"flags": "NOT_NULL | BINARY",
"char_set": 63,
"max_size": 16
}
},
{
"ordinal": 1,
"name": "pending_count",
"type_info": {
"type": "LongLong",
"flags": "NOT_NULL",
"char_set": 63,
"max_size": 21
}
},
{
"ordinal": 2,
"name": "pending_priority_nonzero_count",
"type_info": {
"type": "LongLong",
"flags": "NOT_NULL",
"char_set": 63,
"max_size": 21
}
},
{
"ordinal": 3,
"name": "pending_priority_gt_one_count",
"type_info": {
"type": "LongLong",
"flags": "NOT_NULL",
"char_set": 63,
"max_size": 21
}
},
{
"ordinal": 4,
"name": "attempt_failed_count",
"type_info": {
"type": "LongLong",
"flags": "NOT_NULL",
"char_set": 63,
"max_size": 21
}
}
],
"parameters": {
"Right": 0
},
"nullable": [
false,
false,
false,
false,
false
]
},
"hash": "ed8d32dd94719ad6479dd638cdc7a8cfbf725785f51678533988ddba94aac112"
}