Class AnalysisExecutionScheduledTaskImpl
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.service.impl.AnalysisExecutionScheduledTaskImpl
-
- All Implemented Interfaces:
AnalysisExecutionScheduledTask
public class AnalysisExecutionScheduledTaskImpl extends java.lang.Object implements AnalysisExecutionScheduledTask
Implementation of analysis execution tasks. This will scan forAnalysisSubmission
s and execute theAnalysis
defined by the submissions.
-
-
Constructor Summary
Constructors Constructor Description AnalysisExecutionScheduledTaskImpl(AnalysisSubmissionRepository analysisSubmissionRepository, AnalysisExecutionService analysisExecutionServiceGalaxy, CleanupAnalysisSubmissionCondition cleanupCondition, GalaxyJobErrorsService galaxyJobErrorsService, JobErrorRepository jobErrorRepository, EmailController emailController, AnalysisWorkspaceService analysisWorkspaceService)
Builds a new AnalysisExecutionScheduledTaskImpl with the given service classes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<java.util.concurrent.Future<AnalysisSubmission>>
cleanupAnalysisSubmissions()
Cycle through any completed or erroredAnalysisSubmission
s and delete intermediate files in the execution manager.java.util.Set<java.util.concurrent.Future<AnalysisSubmission>>
executeAnalyses()
Cycle through any outstandingAnalysisSubmission
s and execute them.java.util.Set<java.util.concurrent.Future<AnalysisSubmission>>
monitorRunningAnalyses()
Cycle through anyAnalysisSubmission
s currently running and mark as complete any completed analyses.java.util.Set<java.util.concurrent.Future<AnalysisSubmission>>
postProcessResults()
Cycle through any transferredAnalysisSubmission
s and perform post processing as necessaryjava.util.Set<java.util.concurrent.Future<AnalysisSubmission>>
prepareAnalyses()
Cycle through newAnalysisSubmission
s and prepare them for execution.java.util.Set<java.util.concurrent.Future<AnalysisSubmission>>
transferAnalysesResults()
Cycle through any completedAnalysisSubmission
s and transfer the results to IRIDA.
-
-
-
Constructor Detail
-
AnalysisExecutionScheduledTaskImpl
@Autowired public AnalysisExecutionScheduledTaskImpl(AnalysisSubmissionRepository analysisSubmissionRepository, AnalysisExecutionService analysisExecutionServiceGalaxy, CleanupAnalysisSubmissionCondition cleanupCondition, GalaxyJobErrorsService galaxyJobErrorsService, JobErrorRepository jobErrorRepository, EmailController emailController, AnalysisWorkspaceService analysisWorkspaceService)
Builds a new AnalysisExecutionScheduledTaskImpl with the given service classes.- Parameters:
analysisSubmissionRepository
- A repository forAnalysisSubmission
s.analysisExecutionServiceGalaxy
- A service for executingAnalysisSubmission
s.cleanupCondition
- The condition defining when anAnalysisSubmission
should be cleaned up.galaxyJobErrorsService
-GalaxyJobErrorsService
for gettingJobError
objectsjobErrorRepository
-JobErrorRepository
forJobError
objectsemailController
-EmailController
for sending completion/error emails forAnalysisSubmission
sanalysisWorkspaceService
-AnalysisWorkspaceService
-
-
Method Detail
-
prepareAnalyses
public java.util.Set<java.util.concurrent.Future<AnalysisSubmission>> prepareAnalyses()
Cycle through newAnalysisSubmission
s and prepare them for execution.- Specified by:
prepareAnalyses
in interfaceAnalysisExecutionScheduledTask
- Returns:
- A
Set
ofFuture
AnalysisSubmission
s reflecting the changes in this submission along each of the stages.
-
executeAnalyses
public java.util.Set<java.util.concurrent.Future<AnalysisSubmission>> executeAnalyses()
Cycle through any outstandingAnalysisSubmission
s and execute them.- Specified by:
executeAnalyses
in interfaceAnalysisExecutionScheduledTask
- Returns:
- A
Set
ofFuture
AnalysisSubmission
s reflecting the changes in this submission along each of the stages.
-
monitorRunningAnalyses
public java.util.Set<java.util.concurrent.Future<AnalysisSubmission>> monitorRunningAnalyses()
Cycle through anyAnalysisSubmission
s currently running and mark as complete any completed analyses.- Specified by:
monitorRunningAnalyses
in interfaceAnalysisExecutionScheduledTask
- Returns:
- A
Set
ofFuture
AnalysisSubmission
s reflecting the changes in this submission along each of the stages.
-
transferAnalysesResults
public java.util.Set<java.util.concurrent.Future<AnalysisSubmission>> transferAnalysesResults()
Cycle through any completedAnalysisSubmission
s and transfer the results to IRIDA.- Specified by:
transferAnalysesResults
in interfaceAnalysisExecutionScheduledTask
- Returns:
- A
Set
ofFuture
AnalysisSubmission
s reflecting the changes in this submission along each of the stages.
-
postProcessResults
public java.util.Set<java.util.concurrent.Future<AnalysisSubmission>> postProcessResults()
Cycle through any transferredAnalysisSubmission
s and perform post processing as necessary- Specified by:
postProcessResults
in interfaceAnalysisExecutionScheduledTask
- Returns:
- a Set of Future
AnalysisSubmission
s
-
cleanupAnalysisSubmissions
public java.util.Set<java.util.concurrent.Future<AnalysisSubmission>> cleanupAnalysisSubmissions()
Cycle through any completed or erroredAnalysisSubmission
s and delete intermediate files in the execution manager.- Specified by:
cleanupAnalysisSubmissions
in interfaceAnalysisExecutionScheduledTask
- Returns:
- A
Set
ofFuture
AnalysisSubmission
s for all the analyses that were cleaned.
-
-