diff --git a/apps/cli/executables/go/pims_analyzer/pkg/pims/get_data.go b/apps/cli/executables/go/pims_analyzer/pkg/pims/get_data.go index cfd8c43989000d3ad62f19bdd3e85f5b4320d844..74323befc0b1c0957ddc5d45103773fa494a4ab9 100644 --- a/apps/cli/executables/go/pims_analyzer/pkg/pims/get_data.go +++ b/apps/cli/executables/go/pims_analyzer/pkg/pims/get_data.go @@ -58,7 +58,6 @@ type PimsInfo struct { // database type workflowEntry struct { arguments []byte - state string resultsDir string } @@ -111,8 +110,12 @@ func GetPimsInfo(workflowId int, capoPath string, capoProfile string) PimsInfo { strings.Replace(capoProfile, "dsoc-", "vlass_", -1), pimsInfo.Calibration, ) - pimsInfo.StatusMsg = fmt.Sprintf("PIMS Split workflow completed with state: %s", - wfEntry.state, + + // Workflow reported as failed when there are failed splits + status := "succeeded" + if (pimsInfo.NumFailedSplits != 0) { status = "failed" } + pimsInfo.StatusMsg = fmt.Sprintf("PIMS Split workflow %s!", + status, ) // Check if there's a Restored MS Path @@ -163,7 +166,7 @@ func GetPimsInfo(workflowId int, capoPath string, capoProfile string) PimsInfo { func getWorkflowColumns(workflowId int, dbConnection *sql.DB) (workflowEntry, error) { workflowTable := "workflow_requests" workflowIdKey := "workflow_request_id" - dataCols := "argument,state,results_dir" + dataCols := "argument,results_dir" var entry workflowEntry // var tmpArgs string // Must get JSON as string first @@ -177,7 +180,7 @@ func getWorkflowColumns(workflowId int, dbConnection *sql.DB) (workflowEntry, er workflowTable, workflowIdKey, workflowId), - ).Scan(&entry.arguments, &entry.state, &entry.resultsDir) + ).Scan(&entry.arguments, &entry.resultsDir) return entry, err }