use of com.github.jmchilton.blend4j.galaxy.JobsClient in project irida by phac-nml.
the class AnalysisProvenanceServiceGalaxyTest method setUp.
@Before
public void setUp() {
this.galaxyHistoriesService = mock(GalaxyHistoriesService.class);
this.toolsClient = mock(ToolsClient.class);
this.jobsClient = mock(JobsClient.class);
this.provenanceService = new AnalysisProvenanceServiceGalaxy(galaxyHistoriesService, toolsClient, jobsClient);
}
use of com.github.jmchilton.blend4j.galaxy.JobsClient in project irida by phac-nml.
the class JobDetailsCommandLineTransfer method main.
public static void main(String[] args) {
checkNotNull(GALAXY_URL, "Galaxy URL is required. [galaxy.url]");
checkNotNull(GALAXY_API, "Galaxy API key is required. [galaxy.api.key]");
checkNotNull(JDBC_URL, "JDBC URL is required. [jdbc.url]");
checkNotNull(JDBC_USER, "JDBC user is required. [jdbc.user]");
checkNotNull(JDBC_PASS, "JDBC password is required. [jdbc.pass]");
final GalaxyInstance gi = GalaxyInstanceFactory.get(GALAXY_URL, GALAXY_API);
final JobsClient jobsClient = gi.getJobsClient();
final DriverManagerDataSource dataSource = new DriverManagerDataSource(JDBC_URL, JDBC_USER, JDBC_PASS);
dataSource.setDriverClassName("com.mysql.jdbc.Driver");
final JdbcTemplate template = new JdbcTemplate(dataSource);
template.query("select id, execution_manager_identifier from tool_execution", (rs, row) -> Pair.of(rs.getLong("id"), rs.getString("execution_manager_identifier"))).forEach(e -> {
final JobDetails jobDetails = jobsClient.showJob(e.v);
template.update("update tool_execution set command_line = ? where id = ?", jobDetails.getCommandLine(), e.k);
logger.debug(String.format("Updated tool execution [%s] with command line [%s]", e.k, jobDetails.getCommandLine()));
});
}
use of com.github.jmchilton.blend4j.galaxy.JobsClient in project irida by phac-nml.
the class AnalysisExecutionServiceTestConfig method analysisProvenanceServiceGalaxy.
@Lazy
@Bean
public AnalysisProvenanceServiceGalaxy analysisProvenanceServiceGalaxy() {
final ToolsClient toolsClient = localGalaxy.getGalaxyInstanceAdmin().getToolsClient();
final JobsClient jobsClient = localGalaxy.getGalaxyInstanceAdmin().getJobsClient();
return new AnalysisProvenanceServiceGalaxy(galaxyHistoriesService, toolsClient, jobsClient);
}
Aggregations