From 471f5ad4f03033ef8cac6739b0687c0b6ec5a5d4 Mon Sep 17 00:00:00 2001 From: Denis Yuen Date: Wed, 21 Feb 2024 16:31:21 -0500 Subject: [PATCH] minor fix to log --- .../metricsaggregator/client/cli/TerraMetricsSubmitter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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()); } /**