This commit is contained in:
mdoglio 2013-11-06 18:56:18 +00:00
Родитель f51bae0d07
Коммит 768a26da1d
4 изменённых файлов: 11 добавлений и 7 удалений

Просмотреть файл

@ -31,6 +31,6 @@
}
],
"machine": "tegra-132",
"state": "finished",
"state": "completed",
"product_name": "mobile"
}, "revision_hash": "0686a4d3fa477cb0415c9ca590177e4b03919b64"}

Просмотреть файл

@ -35,7 +35,7 @@ def test_completed_job_available(jm, initial_data, completed_jobs_loaded):
jobs = resp.json
assert len(jobs) == 1
assert jobs[0]['state'] == 'finished'
assert jobs[0]['state'] == 'completed'
def test_pending_stored_to_running_loaded(jm, initial_data, pending_jobs_stored, running_jobs_stored):
@ -66,7 +66,7 @@ def test_finished_job_to_running(jm, initial_data, completed_jobs_loaded, runnin
jobs = resp.json
assert len(jobs) == 1
assert jobs[0]['state'] == 'finished'
assert jobs[0]['state'] == 'completed'
def test_running_job_to_pending(jm, initial_data, running_jobs_stored, pending_jobs_stored):

Просмотреть файл

@ -644,9 +644,12 @@ class JobsModel(TreeherderModelBase):
self._load_job_artifacts(artifact_placeholders, job_id_lookup)
# If there is already a job_guid stored with pending/running status
# If there is already a job_id stored with pending/running status
# we need to update the information for the complete job
if job_update_placeholders:
# replace job_guid with job_id
for row in job_update_placeholders:
row[-1] = job_id_lookup[row[-1]]['id']
self.get_jobs_dhub().execute(
proc='jobs.updates.update_job_data',
@ -816,7 +819,6 @@ class JobsModel(TreeherderModelBase):
start_timestamp,
end_timestamp,
job_state,
job_state,
job_guid
] )

Просмотреть файл

@ -141,8 +141,10 @@
`state` = ?,
`start_timestamp` = ?,
`end_timestamp` = ?
WHERE ( ( ? = 'completed' AND `state` != 'completed') OR
( ? = 'running' AND `state` = 'pending' ) ) AND `id` = ?",
WHERE
`state` != 'completed'
AND ? <> 'pending'
AND `id` = ?",
"host":"master_host"
}