Class AnalysisExecutionServiceAspect
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.service.analysis.execution.AnalysisExecutionServiceAspect
-
@Order(999) public class AnalysisExecutionServiceAspect extends java.lang.Object
Switches anAnalysisSubmission
to an error state on an exception when being submitted for analysis. TheOrder
here needs to be a value between the order ofAnalysisExecutionServiceGalaxyAsync
(AnalysisExecutionServiceConfig.ASYNC_ORDER
) and the order of the Transaction Manager (IridaApiRepositoriesConfig.TRANSACTION_MANAGEMENT_ORDER
). This means that the order of execution isAnalysisExecutionServiceGalaxyAsync
, thenAnalysisExecutionServiceAspect
, then Transaction Manager.
-
-
Field Summary
Fields Modifier and Type Field Description static int
ANALYSIS_EXECUTION_ASPECT_ORDER
Defines the order for theAnalysisExecutionServiceAspect
.
-
Constructor Summary
Constructors Constructor Description AnalysisExecutionServiceAspect(AnalysisSubmissionRepository analysisSubmissionRepository, EmailController emailController)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
toErrorStateOnCleaningException(AnalysisSubmission analysisSubmission, java.lang.Exception exception)
Aspect that matches any asynchronous calls for cleaning analysis submissions and switches to a cleaned error state.void
toErrorStateOnException(AnalysisSubmission analysisSubmission, java.lang.Exception exception)
Aspect that matches any asynchronous calls for performing analysis submissions and switches the submission to an error state on an exception.
-
-
-
Field Detail
-
ANALYSIS_EXECUTION_ASPECT_ORDER
public static final int ANALYSIS_EXECUTION_ASPECT_ORDER
Defines the order for theAnalysisExecutionServiceAspect
.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AnalysisExecutionServiceAspect
@Autowired public AnalysisExecutionServiceAspect(AnalysisSubmissionRepository analysisSubmissionRepository, EmailController emailController)
-
-
Method Detail
-
toErrorStateOnException
public void toErrorStateOnException(AnalysisSubmission analysisSubmission, java.lang.Exception exception)
Aspect that matches any asynchronous calls for performing analysis submissions and switches the submission to an error state on an exception.- Parameters:
analysisSubmission
- The submission that has failed.exception
- The exception that was thrown.
-
toErrorStateOnCleaningException
public void toErrorStateOnCleaningException(AnalysisSubmission analysisSubmission, java.lang.Exception exception)
Aspect that matches any asynchronous calls for cleaning analysis submissions and switches to a cleaned error state. exception.- Parameters:
analysisSubmission
- The submission that has failed to be cleaned.exception
- The exception that was thrown.
-
-