Skip to content

Commit

Permalink
Merge pull request #464 from apriltuesday/EVA-3719
Browse files Browse the repository at this point in the history
EVA-3719: Retry MissingUnsavedAccessionsException
  • Loading branch information
apriltuesday authored Dec 19, 2024
2 parents 8fd081a + 87ef5fe commit c76ddcc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
matrix:
mongodb-version: [4.0.18]
java-version: [1.8]
python-version: [3.7]
python-version: [3.8]

steps:
- uses: actions/checkout@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.retry.backoff.ExponentialBackOffPolicy;
import uk.ac.ebi.ampt2d.commons.accession.core.exceptions.MissingUnsavedAccessionsException;

import uk.ac.ebi.eva.accession.pipeline.batch.io.AccessionWriter;
import uk.ac.ebi.eva.accession.pipeline.batch.policies.InvalidVariantSkipPolicy;
Expand Down Expand Up @@ -72,6 +74,11 @@ public Step createSubsnpAccessionStep(StepBuilderFactory stepBuilderFactory,
.processor(variantProcessor)
.writer(accessionWriter)
.faultTolerant()
// Exception can arise from running parallel accessioning jobs for a single study, hence the retry.
// See EVA-3719 for details.
.retry(MissingUnsavedAccessionsException.class)
.retryLimit(3)
.backOffPolicy(new ExponentialBackOffPolicy())
.skipPolicy(invalidVariantSkipPolicy)
.listener(stepListener)
.build();
Expand Down

0 comments on commit c76ddcc

Please sign in to comment.