Handle benchmark running state properly
This commit is contained in:
parent
9c7d39d523
commit
1e8841ce69
|
@ -96,7 +96,13 @@ def list_benchmarks(job=None):
|
|||
benchmark_data['id'] = benchmark['id']
|
||||
benchmark_data['job'] = benchmark['job']
|
||||
benchmark_data['test_format'] = benchmark['test_format']
|
||||
if benchmark['result'] == 'Running':
|
||||
benchmark_data['benchmark_result'] = 'Running'
|
||||
else:
|
||||
try:
|
||||
benchmark_data['benchmark_result'] = loads(benchmark['result'])
|
||||
except Exception:
|
||||
benchmark_data['benchmark_result'] = {}
|
||||
# Append the new data to our actual output structure
|
||||
data.append(benchmark_data)
|
||||
close_database(conn, cur)
|
||||
|
|
Loading…
Reference in New Issue