Commit dbe35cfd authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Allowed pending job phase on async recall

parent a4fd95a8
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -70,11 +70,12 @@ public class JobController extends BaseController {

        JobSummary job = client.startTransferJob(transfer);

        if (job.getPhase() == ExecutionPhase.QUEUED) {
        if (job.getPhase() == ExecutionPhase.QUEUED || job.getPhase() == ExecutionPhase.PENDING) {
            return ResponseEntity.ok(new Job(job));
        }
        // TODO: proper handling
        throw new RuntimeException("Error while executing job " + job.getJobId() + ". Job phase is " + job.getPhase() + ". QUEUED expected");
        throw new RuntimeException("Error while executing job " + job.getJobId() + ". Job phase is "
                + job.getPhase() + ". QUEUED or PENDING expected");
    }

    private String createTempListOfFilesNode(List<String> paths) {