Skip to content

Commit

Permalink
retry MissingUnsavedAccessionsException
Browse files Browse the repository at this point in the history
  • Loading branch information
apriltuesday committed Dec 17, 2024
1 parent 8fd081a commit 47e7879
Showing 1 changed file with 5 additions and 0 deletions.
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,9 @@ public Step createSubsnpAccessionStep(StepBuilderFactory stepBuilderFactory,
.processor(variantProcessor)
.writer(accessionWriter)
.faultTolerant()
.retry(MissingUnsavedAccessionsException.class)
.retryLimit(3)
.backOffPolicy(new ExponentialBackOffPolicy())
.skipPolicy(invalidVariantSkipPolicy)
.listener(stepListener)
.build();
Expand Down

0 comments on commit 47e7879

Please sign in to comment.