use of ca.corefacility.bioinformatics.irida.exceptions.IridaWorkflowException in project irida by phac-nml.
the class AnalysisExecutionScheduledTaskImpl method transferAnalysesResults.
/**
* {@inheritDoc}
*/
@Override
public Set<Future<AnalysisSubmission>> transferAnalysesResults() {
synchronized (transferAnalysesResultsLock) {
logger.trace("Running transferAnalysesResults");
List<AnalysisSubmission> analysisSubmissions = analysisSubmissionRepository.findByAnalysisState(AnalysisState.FINISHED_RUNNING);
Set<Future<AnalysisSubmission>> submissions = Sets.newHashSet();
for (AnalysisSubmission analysisSubmission : analysisSubmissions) {
logger.debug("Transferring results for " + analysisSubmission);
try {
submissions.add(analysisExecutionService.transferAnalysisResults(analysisSubmission));
} catch (ExecutionManagerException | IOException | IridaWorkflowException e) {
logger.error("Error transferring submission " + analysisSubmission, e);
}
}
return submissions;
}
}
use of ca.corefacility.bioinformatics.irida.exceptions.IridaWorkflowException in project irida by phac-nml.
the class AnalysisExecutionScheduledTaskImpl method executeAnalyses.
/**
* {@inheritDoc}
*/
@Override
public Set<Future<AnalysisSubmission>> executeAnalyses() {
synchronized (executeAnalysesLock) {
logger.trace("Running executeAnalyses");
List<AnalysisSubmission> analysisSubmissions = analysisSubmissionRepository.findByAnalysisState(AnalysisState.PREPARED);
Set<Future<AnalysisSubmission>> submissions = Sets.newHashSet();
for (AnalysisSubmission analysisSubmission : analysisSubmissions) {
logger.debug("Executing " + analysisSubmission);
try {
submissions.add(analysisExecutionService.executeAnalysis(analysisSubmission));
} catch (ExecutionManagerException | IridaWorkflowException e) {
logger.error("Error executing submission " + analysisSubmission, e);
}
}
return submissions;
}
}
use of ca.corefacility.bioinformatics.irida.exceptions.IridaWorkflowException in project irida by phac-nml.
the class IridaWorkflowsService method registerWorkflow.
/**
* Registers the given workflow with this service.
*
* @param iridaWorkflow
* The workflow to register.
* @throws IridaWorkflowException
* If there was an issue when registering the workflow.
*/
public void registerWorkflow(IridaWorkflow iridaWorkflow) throws IridaWorkflowException {
checkNotNull(iridaWorkflow, "iridaWorkflow is null");
checkNotNull(iridaWorkflow.getWorkflowDescription().getAnalysisType(), "analysisType is null");
UUID workflowId = iridaWorkflow.getWorkflowDescription().getId();
logger.debug("Registering workflow: " + iridaWorkflow);
if (allRegisteredWorkflows.containsKey(workflowId)) {
throw new IridaWorkflowException("Duplicate workflow " + workflowId);
} else {
allRegisteredWorkflows.put(workflowId, iridaWorkflow);
}
}
Aggregations