Skip to content
Snippets Groups Projects
Commit 77fde960 authored by gmantele's avatar gmantele
Browse files

[TAP] Allow creation of PENDING jobs ONLY FROM the TAPFactory when the service...

[TAP] Allow creation of PENDING jobs ONLY FROM the TAPFactory when the service is unavailable. Before this modification, the backup manager could not restore jobs at the service starting. When the service is said unavailable, the resources /sync and /async are rejecting HTTP requests, but jobs can be created and started in background (very useful for backup restoration but also for queued jobs).
parent 62a44426
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,6 @@ import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import tap.db.DBConnection;
import tap.metadata.TAPSchema;
......@@ -277,9 +276,6 @@ public abstract class TAPFactory implements UWSFactory {
*/
@Override
public final UWSJob createJob(HttpServletRequest request, JobOwner owner) throws UWSException{
if (!service.isAvailable())
throw new UWSException(HttpServletResponse.SC_SERVICE_UNAVAILABLE, service.getAvailability());
return createTAPJob(request, owner);
}
......@@ -320,9 +316,6 @@ public abstract class TAPFactory implements UWSFactory {
*/
@Override
public final UWSJob createJob(String jobId, JobOwner owner, final UWSParameters params, long quote, long startTime, long endTime, List<Result> results, ErrorSummary error) throws UWSException{
if (!service.isAvailable())
throw new UWSException(HttpServletResponse.SC_SERVICE_UNAVAILABLE, service.getAvailability());
return createTAPJob(jobId, owner, (TAPParameters)params, quote, startTime, endTime, results, error);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment