55import app .api .v1 .commons .hasher as hasher
66from datetime import datetime , timezone
77import app .api .v1 .commons .utils as utils
8+ import app .api .v1 .endpoints .telco .telcoGraphs as telcoGraphs
89
910
1011async 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):
3637 for each_response in response :
3738 end_timestamp = int (each_response ['timestamp' ])
3839 test_data = each_response ['data' ]
40+ threshold = await telcoGraphs .process_json (test_data , True )
3941 hash_digest , encrypted_data = hasher .hash_encrypt_json (each_response )
4042 execution_time_seconds = test_type_execution_times .get (test_data ['test_type' ], 0 )
4143 start_timestamp = end_timestamp - execution_time_seconds
@@ -58,7 +60,7 @@ async def getData(start_datetime: date, end_datetime: date, configpath: str):
5860 "startDate" : str (start_time_utc ),
5961 "endDate" : str (end_time_utc ),
6062 "buildUrl" : jenkins_url + "/" + str (test_data ['cluster_artifacts' ]['ref' ]['jenkins_build' ]),
61- "jobStatus" : "success" ,
63+ "jobStatus" : "failure" if ( threshold != 0 ) else " success" ,
6264 "jobDuration" : execution_time_seconds ,
6365 })
6466
0 commit comments