Commit f2337c4d authored by gmantele's avatar gmantele
Browse files

[TAP] Fix a grave error: synchronous jobs were stopped much before the...

[TAP] Fix a grave error: synchronous jobs were stopped much before the specified execution duration ; the library was waiting N milliseconds, where N is the TAP execution duration always expressed in seconds.
parent 2a1e5786
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ import uws.service.log.UWSLog.LogLevel;
 * </p>
 * 
 * @author Gr&eacute;gory Mantelet (CDS;ARI)
 * @version 2.0 (09/2014)
 * @version 2.0 (11/2014)
 */
public class TAPSyncJob {

@@ -190,7 +190,7 @@ public class TAPSyncJob {
		boolean timeout = false;
		try{
			// wait the end:
			thread.join(tapParams.getExecutionDuration());
			thread.join(tapParams.getExecutionDuration() * 1000);
			// if still alive after this duration, interrupt it:
			if (thread.isAlive()){
				timeout = true;
@@ -198,7 +198,7 @@ public class TAPSyncJob {
				thread.join(waitForStop);
			}
		}catch(InterruptedException ie){
			/* Having a such exception here, is not surprising, because we may have interrupt the thread! */
			/* Having a such exception here, is not surprising, because we may have interrupted the thread! */
		}finally{
			// Whatever the way the execution stops (normal, cancel or error), an execution report must be fulfilled:
			execReport = thread.getExecutionReport();
+2 −2
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ import uws.service.log.DefaultUWSLog;
 * Default implementation of the {@link TAPLog} interface which lets logging any message about a TAP service.
 * 
 * @author Gr&eacute;gory Mantelet (CDS;ARI)
 * @version 2.0 (09/2014)
 * @version 2.0 (11/2014)
 * 
 * @see DefaultUWSLog
 */
@@ -126,7 +126,7 @@ public class DefaultTAPLog extends DefaultUWSLog implements TAPLog {
		}

		// Log the message:
		log(level, "TAP", event, jobId, message + msgAppend, error);
		log(level, "TAP", event, jobId, message + (msgAppend != null ? msgAppend : ""), error);
	}

}