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 24cabbc3..6db31ee6 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 @@ -199,7 +199,6 @@ private void executionMetricsPost(List workflowExecutionsToSubmit, try { extendedGa4GhApi.executionMetricsPost(new ExecutionsRequestBody().runExecutions(workflowExecutionsToSubmit), Partner.TERRA.toString(), sourceUrlTrsInfo.trsId(), sourceUrlTrsInfo.version(), description); - numberOfExecutionsSubmitted.addAndGet(workflowMetricRecords.size()); } catch (ApiException e) { if (e.getCode() == HttpStatus.SC_REQUEST_TOO_LONG) { // One execution is too large, not much that can be done, so log and skip it @@ -225,7 +224,10 @@ private void executionMetricsPost(List workflowExecutionsToSubmit, String.format("Could not submit execution metrics to Dockstore for workflow %s: %s", sourceUrlTrsInfo, e.getMessage()), skippedExecutionsCsvPrinter, false); } + return; } + // only count if there was no exception + numberOfExecutionsSubmitted.addAndGet(workflowMetricRecords.size()); } /**