From 3d8f7855d599412e3b09287c809652dc815184bb Mon Sep 17 00:00:00 2001 From: Kathy Tran Date: Wed, 3 Jan 2024 10:00:06 -0500 Subject: [PATCH] Don't check execution first --- .../client/cli/TerraMetricsSubmitter.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/metricsaggregator/src/main/java/io/dockstore/metricsaggregator/client/cli/TerraMetricsSubmitter.java b/metricsaggregator/src/main/java/io/dockstore/metricsaggregator/client/cli/TerraMetricsSubmitter.java index 12b73eb2..dbc43bb4 100644 --- a/metricsaggregator/src/main/java/io/dockstore/metricsaggregator/client/cli/TerraMetricsSubmitter.java +++ b/metricsaggregator/src/main/java/io/dockstore/metricsaggregator/client/cli/TerraMetricsSubmitter.java @@ -156,12 +156,6 @@ private void processWorkflowExecution(CSVRecord workflowMetricRecord, WorkflowsA return; } - // Check if the information from the workflow execution is valid - Optional workflowExecution = getTerraWorkflowExecutionFromCsvRecord(workflowMetricRecord, sourceUrl, skippedExecutionsCsvPrinter); - if (workflowExecution.isEmpty()) { - return; - } - if (!sourceUrlToSourceUrlTrsInfo.containsKey(sourceUrl)) { Optional sourceUrlTrsInfo = calculateTrsInfoFromSourceUrl(workflowMetricRecord, sourceUrl, workflowsApi, skippedExecutionsCsvPrinter); if (sourceUrlTrsInfo.isEmpty()) { @@ -171,6 +165,12 @@ private void processWorkflowExecution(CSVRecord workflowMetricRecord, WorkflowsA } } + // Check if the information from the workflow execution is valid + Optional workflowExecution = getTerraWorkflowExecutionFromCsvRecord(workflowMetricRecord, sourceUrl, skippedExecutionsCsvPrinter); + if (workflowExecution.isEmpty()) { + return; + } + final SourceUrlTrsInfo sourceUrlTrsInfo = sourceUrlToSourceUrlTrsInfo.get(sourceUrl); final ExecutionsRequestBody executionsRequestBody = new ExecutionsRequestBody().runExecutions(List.of(workflowExecution.get())); try {