-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
creating new step for shutting down acession generator
- Loading branch information
Showing
12 changed files
with
90 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...k/ac/ebi/eva/accession/clustering/configuration/batch/steps/AccessioningShutdownStep.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package uk.ac.ebi.eva.accession.clustering.configuration.batch.steps; | ||
|
||
import org.springframework.batch.core.Step; | ||
import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing; | ||
import org.springframework.batch.core.configuration.annotation.StepBuilderFactory; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import uk.ac.ebi.eva.accession.core.service.nonhuman.ClusteredVariantAccessioningService; | ||
import uk.ac.ebi.eva.accession.core.service.nonhuman.SubmittedVariantAccessioningService; | ||
|
||
import static uk.ac.ebi.eva.accession.clustering.configuration.BeanNames.ACCESSIONING_SHUTDOWN_STEP; | ||
|
||
@Configuration | ||
@EnableBatchProcessing | ||
public class AccessioningShutdownStep { | ||
@Autowired | ||
private SubmittedVariantAccessioningService submittedVariantAccessioningService; | ||
|
||
@Autowired | ||
private ClusteredVariantAccessioningService clusteredVariantAccessioningService; | ||
|
||
@Bean(ACCESSIONING_SHUTDOWN_STEP) | ||
public Step accessioningShutDownStep(StepBuilderFactory stepBuilderFactory) { | ||
return stepBuilderFactory.get("accessioningShutdownStep") | ||
.tasklet((contribution, chunkContext) -> { | ||
submittedVariantAccessioningService.shutDownAccessionGenerator(); | ||
clusteredVariantAccessioningService.shutDownAccessionGenerator(); | ||
return null; | ||
}) | ||
.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
.../uk/ac/ebi/eva/accession/pipeline/configuration/batch/steps/AccessioningShutdownStep.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package uk.ac.ebi.eva.accession.pipeline.configuration.batch.steps; | ||
|
||
import org.springframework.batch.core.Step; | ||
import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing; | ||
import org.springframework.batch.core.configuration.annotation.StepBuilderFactory; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import uk.ac.ebi.eva.accession.core.service.nonhuman.SubmittedVariantAccessioningService; | ||
|
||
import static uk.ac.ebi.eva.accession.pipeline.configuration.BeanNames.ACCESSIONING_SHUTDOWN_STEP; | ||
|
||
@Configuration | ||
@EnableBatchProcessing | ||
public class AccessioningShutdownStep { | ||
@Autowired | ||
private SubmittedVariantAccessioningService submittedVariantAccessioningService; | ||
|
||
@Bean(ACCESSIONING_SHUTDOWN_STEP) | ||
public Step accessioningShutDownStep(StepBuilderFactory stepBuilderFactory) { | ||
return stepBuilderFactory.get("accessioningShutdownStep") | ||
.tasklet((contribution, chunkContext) -> { | ||
submittedVariantAccessioningService.shutDownAccessionGenerator(); | ||
return null; | ||
}) | ||
.build(); | ||
} | ||
} |