From 8c802e6e2db9eb129454dfab79caab97b5d37f4c Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 20 May 2015 11:32:27 +0100 Subject: [PATCH] JAL-1601 todos for this --- src/jalview/ws/rest/RestJobThread.java | 7 +++++++ src/jalview/ws/rest/RestServiceDescription.java | 15 ++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/jalview/ws/rest/RestJobThread.java b/src/jalview/ws/rest/RestJobThread.java index ee971f5..d3e36a7 100644 --- a/src/jalview/ws/rest/RestJobThread.java +++ b/src/jalview/ws/rest/RestJobThread.java @@ -174,9 +174,13 @@ public class RestJobThread extends AWSThread private String getStage(Stage stg) { if (stg == Stage.SUBMIT) + { return "submitting "; + } if (stg == Stage.POLL) + { return "checking status of "; + } return (" being confused about "); } @@ -308,6 +312,9 @@ public class RestJobThread extends AWSThread + " location(s) provided in response header ( next one is '" + loc[1].getValue() + "' )"); } + // TODO: job ID may not be simply a redirect in response to the post. + // might need other scraping mechanisms here. + rj.setJobId(loc[0].getValue()); rj.setSubmitted(true); } diff --git a/src/jalview/ws/rest/RestServiceDescription.java b/src/jalview/ws/rest/RestServiceDescription.java index e7c861f..6f89393 100644 --- a/src/jalview/ws/rest/RestServiceDescription.java +++ b/src/jalview/ws/rest/RestServiceDescription.java @@ -20,6 +20,13 @@ */ package jalview.ws.rest; +import jalview.datamodel.SequenceI; +import jalview.io.packed.DataProvider.JvDataType; +import jalview.util.StringUtils; +import jalview.ws.rest.params.Alignment; +import jalview.ws.rest.params.AnnotationFile; +import jalview.ws.rest.params.SeqGroupIndexVector; + import java.net.URL; import java.util.ArrayList; import java.util.HashMap; @@ -31,13 +38,6 @@ import java.util.StringTokenizer; import java.util.regex.Matcher; import java.util.regex.Pattern; -import jalview.datamodel.SequenceI; -import jalview.io.packed.DataProvider.JvDataType; -import jalview.util.StringUtils; -import jalview.ws.rest.params.Alignment; -import jalview.ws.rest.params.AnnotationFile; -import jalview.ws.rest.params.SeqGroupIndexVector; - public class RestServiceDescription { private static final Pattern PARAM_ENCODED_URL_PATTERN = Pattern.compile("([?&])([A-Za-z0-9_]+)=\\$([^$]+)\\$"); @@ -830,6 +830,7 @@ public class RestServiceDescription public String getDecoratedResultUrl(String jobId) { + // TODO: JPred4 - jobs are checked at a different path to the jobId ? // TODO: correctly write ?/& appropriate to result URL format. return jobId + urlSuffix; } -- 1.7.10.2