def createRequestDetails(fileName, fileID, md5Checksum, mStatus, mResponse, requestID): try: ext = fileName.rsplit(".", 1)[1].upper() except: print("ERROR: GEN_UML: Could not extract file's extension.") ext = "-" #create a dictionary with details of the uploaded file requestDetails = { "FileName": fileName, "FileType": ext, "FileID": fileID, "RequestID": requestID, "MD5": md5Checksum, "Status": mStatus, "HttpResponse": mResponse, "timeStamp": getTimeStamp() } if dc.updateHistory(requestDetails, requestID): print("INFO: GEN_UML: History log updated.") else: print("ERROR: GEN_UML: Request could not be added to history log.") return requestDetails
def createRequestDetails(mStatus, mResponse, requestID): #create a dictionary with details of the uploaded file requestDetails = { "Service": "New User Registration", "RequestID": requestID, "Status": mStatus, "HttpResponse": mResponse, "timeStamp": dc.getTimeStamp() } if dc.updateHistory(requestDetails, requestID): print("INFO: SIGNUP: History log updated.") else: print("ERROR: SIGNUP: Request could not be added to history log.") return requestDetails
def createRequestDetails(inFileID, outFileID, mStatus, mResponse, requestID): #create a dictionary with details of the uploaded file requestDetails = { "In_FileName": str(inFileID), "Out_FileID": str(outFileID), "RequestID": requestID, "Status": mStatus, "HttpResponse": mResponse, "timeStamp": fh.getTimeStamp() } if dc.updateHistory(requestDetails, requestID): print("INFO: HyAPI_ML: History log updated.") else: print("ERROR: HyAPI_ML: Request could not be added to history log.") return requestDetails
def createReqDetails_training(wfID, containerID, baseModel, requestID, mStatus, httpCode): #create a dictionary with details of the uploaded file requestDetails = { "WorkFlowID": str(wfID), "ContainerID": containerID, "BaseModel": baseModel, "RequestID": requestID, "Status": mStatus, "HttpResponse": httpCode, "timeStamp": fh.getTimeStamp() } if dc.updateHistory(requestDetails, requestID): print("INFO: HyAPI_ML: History log updated.") else: print("ERROR: HyAPI_ML: Request could not be added to history log.") return requestDetails