5
5
import app .api .v1 .commons .hasher as hasher
6
6
from datetime import datetime , timezone
7
7
import app .api .v1 .commons .utils as utils
8
+ import app .api .v1 .endpoints .telco .telcoGraphs as telcoGraphs
8
9
9
10
10
11
async def getData (start_datetime : date , end_datetime : date , configpath : str ):
@@ -36,6 +37,7 @@ async def getData(start_datetime: date, end_datetime: date, configpath: str):
36
37
for each_response in response :
37
38
end_timestamp = int (each_response ['timestamp' ])
38
39
test_data = each_response ['data' ]
40
+ threshold = await telcoGraphs .process_json (test_data , True )
39
41
hash_digest , encrypted_data = hasher .hash_encrypt_json (each_response )
40
42
execution_time_seconds = test_type_execution_times .get (test_data ['test_type' ], 0 )
41
43
start_timestamp = end_timestamp - execution_time_seconds
@@ -58,7 +60,7 @@ async def getData(start_datetime: date, end_datetime: date, configpath: str):
58
60
"startDate" : str (start_time_utc ),
59
61
"endDate" : str (end_time_utc ),
60
62
"buildUrl" : jenkins_url + "/" + str (test_data ['cluster_artifacts' ]['ref' ]['jenkins_build' ]),
61
- "jobStatus" : "success" ,
63
+ "jobStatus" : "failure" if ( threshold != 0 ) else " success" ,
62
64
"jobDuration" : execution_time_seconds ,
63
65
})
64
66
0 commit comments