|
|
|
@ -40,6 +40,7 @@ import org.gcube.data.spd.utils.ExecutorsContainer;
|
|
|
|
|
import org.gcube.smartgears.ApplicationManagerProvider;
|
|
|
|
|
import org.gcube.smartgears.ContextProvider;
|
|
|
|
|
import org.gcube.smartgears.context.application.ApplicationContext;
|
|
|
|
|
import org.gcube.smartgears.utils.InnerMethodName;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
|
|
|
|
@ -57,6 +58,7 @@ public class Executor {
|
|
|
|
|
@GET
|
|
|
|
|
@Path("result/{jobKey}")
|
|
|
|
|
public String getResultLink(@PathParam("jobKey") String jobKey) throws InvalidIdentifierException {
|
|
|
|
|
InnerMethodName.instance.set("getJobResultLink");
|
|
|
|
|
String node;
|
|
|
|
|
String jobId;
|
|
|
|
|
try{
|
|
|
|
@ -82,7 +84,7 @@ public class Executor {
|
|
|
|
|
@GET
|
|
|
|
|
@Path("error/{jobKey}")
|
|
|
|
|
public String getErrorLink(@PathParam("jobKey") String jobKey) throws InvalidIdentifierException {
|
|
|
|
|
|
|
|
|
|
InnerMethodName.instance.set("getJobErrorLink");
|
|
|
|
|
String node;
|
|
|
|
|
String jobId;
|
|
|
|
|
|
|
|
|
@ -109,6 +111,7 @@ public class Executor {
|
|
|
|
|
@GET
|
|
|
|
|
@Path("status/{jobKey}")
|
|
|
|
|
public CompleteJobStatus getStatus(@PathParam("jobKey") String jobKey) throws InvalidIdentifierException {
|
|
|
|
|
InnerMethodName.instance.set("getJobStatus");
|
|
|
|
|
logger.trace("[TEST] job status called with id {}", jobKey);
|
|
|
|
|
String node;
|
|
|
|
|
String jobId;
|
|
|
|
@ -159,6 +162,7 @@ public class Executor {
|
|
|
|
|
@DELETE
|
|
|
|
|
@Path("{jobKey}")
|
|
|
|
|
public void removeJob(@PathParam("jobKey") String jobId) throws InvalidIdentifierException {
|
|
|
|
|
InnerMethodName.instance.set("removeJob");
|
|
|
|
|
if (!initializer.getJobMap().containsKey(jobId)) throw new InvalidIdentifierException(jobId);
|
|
|
|
|
initializer.getJobMap().remove(jobId);
|
|
|
|
|
}
|
|
|
|
@ -169,6 +173,7 @@ public class Executor {
|
|
|
|
|
@Consumes(MediaType.APPLICATION_XML)
|
|
|
|
|
@Produces(MediaType.APPLICATION_XML)
|
|
|
|
|
public SubmitJobResponse submitJob(SubmitJob request) throws InvalidJobException {
|
|
|
|
|
InnerMethodName.instance.set("submitJob");
|
|
|
|
|
PluginManager pluginManger = initializer.getPluginManager();
|
|
|
|
|
SpeciesJob job = null;
|
|
|
|
|
switch (request.getJob()) {
|
|
|
|
|