зеркало из https://github.com/mozilla/treeherder.git
116 строки
4.0 KiB
JSON
116 строки
4.0 KiB
JSON
{
|
|
"selects": {
|
|
"get_jobs_for_cycling": {
|
|
|
|
"sql": "SELECT id FROM job WHERE submit_timestamp < ?",
|
|
"host_type": "master_host"
|
|
},
|
|
"get_one_job_for_cycling":{
|
|
|
|
"sql":"SELECT id FROM job WHERE id = ?",
|
|
|
|
"host_type": "master_host"
|
|
},
|
|
"job": {
|
|
"sql": "SELECT * FROM `job` WHERE id = ?",
|
|
"host_type": "master_host"
|
|
},
|
|
"jobs": {
|
|
"sql": "SELECT * FROM `job`",
|
|
"host_type": "master_host"
|
|
},
|
|
"job_artifact": {
|
|
"sql": "SELECT * FROM `job_artifact` WHERE job_id = ?",
|
|
"host_type": "master_host"
|
|
},
|
|
"job_log_urls": {
|
|
"sql": "SELECT * FROM `job_log_url` WHERE job_id = ?",
|
|
"host_type": "master_host"
|
|
},
|
|
"job_source": {
|
|
"sql": "SELECT res.push_timestamp,
|
|
rev.comments,
|
|
rev.repository_id,
|
|
rev.revision
|
|
FROM `revision` as rev
|
|
LEFT JOIN `revision_map` as revmap
|
|
ON rev.id = revmap.revision_id
|
|
LEFT JOIN `result_set` as res
|
|
ON revmap.result_set_id = res.id
|
|
LEFT JOIN `job`
|
|
ON job.result_set_id = res.id
|
|
WHERE job.id = ?
|
|
",
|
|
"host_type": "master_host"
|
|
},
|
|
"row_by_guid": {
|
|
"sql": "SELECT * FROM `job` WHERE `job_guid` = ?",
|
|
"host_type": "master_host"
|
|
},
|
|
"resultset_by_long_revision": {
|
|
"sql": "SELECT * FROM `result_set` WHERE `long_revision` = ?",
|
|
"host_type": "master_host"
|
|
},
|
|
"revision_ids": {
|
|
"sql": "SELECT `id`, `revision`, `long_revision` FROM `revision`",
|
|
"host_type": "master_host"
|
|
},
|
|
"revision_map": {
|
|
"sql": "SELECT * FROM `revision_map`",
|
|
"host_type": "master_host"
|
|
},
|
|
"result_set_ids": {
|
|
"sql": "SELECT `id`, `push_timestamp`, `revision_hash`, `long_revision`, `short_revision` FROM `result_set`",
|
|
"host_type": "master_host"
|
|
},
|
|
"result_sets": {
|
|
"sql": "SELECT * FROM `result_set`",
|
|
"host_type": "master_host"
|
|
}
|
|
},
|
|
"updates": {
|
|
"set_state_any":{
|
|
|
|
"sql":"UPDATE `job`
|
|
SET `state` = ?
|
|
WHERE `id` = ?",
|
|
|
|
"host_type":"master_host"
|
|
},
|
|
"set_jobs_last_modified":{
|
|
"sql":"UPDATE `job` SET `submit_timestamp` = ?",
|
|
|
|
"host_type":"master_host"
|
|
},
|
|
"set_one_job_last_modified_timestamp":{
|
|
"sql":"UPDATE `job` SET `submit_timestamp` = ? WHERE id = 1",
|
|
|
|
"host_type":"master_host"
|
|
},
|
|
"set_job_result":{
|
|
"sql":"UPDATE `job` SET `result` = ? WHERE id = ?",
|
|
|
|
"host_type":"master_host"
|
|
}
|
|
},
|
|
"inserts": {
|
|
"duplicate_job": {
|
|
"sql":"INSERT INTO job
|
|
(job_guid, signature, job_coalesced_to_guid, result_set_id, build_platform_id,
|
|
machine_platform_id, machine_id, option_collection_hash,
|
|
job_type_id, product_id, failure_classification_id, who, reason, result,
|
|
state, submit_timestamp, start_timestamp, end_timestamp, last_modified,
|
|
running_eta, tier, active_status)
|
|
SELECT
|
|
?, signature, job_coalesced_to_guid, result_set_id, build_platform_id,
|
|
machine_platform_id, machine_id, option_collection_hash,
|
|
job_type_id, product_id, failure_classification_id, who, reason, result,
|
|
state, submit_timestamp, start_timestamp, end_timestamp, last_modified,
|
|
running_eta, tier, active_status
|
|
FROM job
|
|
WHERE job_guid = ?",
|
|
"host_type":"master_host"
|
|
}
|
|
}
|
|
}
|