Skip to content
Snippets Groups Projects
Commit 8b8b7e7a authored by Nathan Bockisch's avatar Nathan Bockisch
Browse files

Changed pims_analyzer to report failure/success based on if there were failed splits or not

parent dbe8a096
No related branches found
No related tags found
2 merge requests!1390Catch up with Main,!1318Changed pims_analyzer to report failure/success based on if there were failed splits or not
Pipeline #9531 passed
Pipeline: workspaces

#9533

    ...@@ -58,7 +58,6 @@ type PimsInfo struct { ...@@ -58,7 +58,6 @@ type PimsInfo struct {
    // database // database
    type workflowEntry struct { type workflowEntry struct {
    arguments []byte arguments []byte
    state string
    resultsDir string resultsDir string
    } }
    ...@@ -111,8 +110,12 @@ func GetPimsInfo(workflowId int, capoPath string, capoProfile string) PimsInfo { ...@@ -111,8 +110,12 @@ func GetPimsInfo(workflowId int, capoPath string, capoProfile string) PimsInfo {
    strings.Replace(capoProfile, "dsoc-", "vlass_", -1), strings.Replace(capoProfile, "dsoc-", "vlass_", -1),
    pimsInfo.Calibration, 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 // Check if there's a Restored MS Path
    ...@@ -163,7 +166,7 @@ func GetPimsInfo(workflowId int, capoPath string, capoProfile string) PimsInfo { ...@@ -163,7 +166,7 @@ func GetPimsInfo(workflowId int, capoPath string, capoProfile string) PimsInfo {
    func getWorkflowColumns(workflowId int, dbConnection *sql.DB) (workflowEntry, error) { func getWorkflowColumns(workflowId int, dbConnection *sql.DB) (workflowEntry, error) {
    workflowTable := "workflow_requests" workflowTable := "workflow_requests"
    workflowIdKey := "workflow_request_id" workflowIdKey := "workflow_request_id"
    dataCols := "argument,state,results_dir" dataCols := "argument,results_dir"
    var entry workflowEntry var entry workflowEntry
    // var tmpArgs string // Must get JSON as string first // var tmpArgs string // Must get JSON as string first
    ...@@ -177,7 +180,7 @@ func getWorkflowColumns(workflowId int, dbConnection *sql.DB) (workflowEntry, er ...@@ -177,7 +180,7 @@ func getWorkflowColumns(workflowId int, dbConnection *sql.DB) (workflowEntry, er
    workflowTable, workflowTable,
    workflowIdKey, workflowIdKey,
    workflowId), workflowId),
    ).Scan(&entry.arguments, &entry.state, &entry.resultsDir) ).Scan(&entry.arguments, &entry.resultsDir)
    return entry, err return entry, err
    } }
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment