diff options
author | Andreas Maunz <andreas@maunz.de> | 2011-05-25 13:52:43 +0200 |
---|---|---|
committer | Andreas Maunz <andreas@maunz.de> | 2011-05-25 13:52:43 +0200 |
commit | b5cf8f9b80303696688144d81a61db758ae8fe9f (patch) | |
tree | 74e5b7669db84dd7e1c5e3660553828dfbf68066 /lib | |
parent | d012b9e8da641c342c455a1384ddf3b14f5b5c35 (diff) | |
parent | d5bf9fd2b7f4401c36d00ab6afb1a003fdb07d2f (diff) |
Merge branch 'development' into svm_matrix
Diffstat (limited to 'lib')
-rw-r--r-- | lib/helper.rb | 3 | ||||
-rw-r--r-- | lib/rest_client_wrapper.rb | 2 | ||||
-rw-r--r-- | lib/task.rb | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/lib/helper.rb b/lib/helper.rb index 3a6126a..995f3e9 100644 --- a/lib/helper.rb +++ b/lib/helper.rb @@ -44,8 +44,9 @@ helpers do def uri_available?(urlStr) url = URI.parse(urlStr) + subjectidstr = @subjectid ? "?subjectid=#{CGI.escape @subjectid}" : "" Net::HTTP.start(url.host, url.port) do |http| - return http.head("#{url.request_uri}?subjectid=#{CGI.escape @subjectid}").code == "200" + return http.head("#{url.request_uri}#{subjectidstr}").code == "200" end end diff --git a/lib/rest_client_wrapper.rb b/lib/rest_client_wrapper.rb index 747a353..53887a2 100644 --- a/lib/rest_client_wrapper.rb +++ b/lib/rest_client_wrapper.rb @@ -131,7 +131,7 @@ module OpenTox raise "unknown content-type for task : '"+res.content_type.to_s+"'"+" base-uri: "+base_uri.to_s+" content: "+res[0..200].to_s end - LOGGER.debug "result is a task '"+task.uri.to_s+"', wait for completion" + #LOGGER.debug "result is a task '"+task.uri.to_s+"', wait for completion" task.wait_for_completion waiting_task unless task.completed? # maybe task was cancelled / error if task.errorReport diff --git a/lib/task.rb b/lib/task.rb index 42d3d17..146a756 100644 --- a/lib/task.rb +++ b/lib/task.rb @@ -288,7 +288,8 @@ module OpenTox if @http_code == 202 raise "#{@uri}: illegal task state, code is 202, but hasStatus is not Running: '"+@metadata[OT.hasStatus]+"'" unless running? elsif @http_code == 201 - raise "#{@uri}: illegal task state, code is 201, but hasStatus is not Completed: '"+@metadata[OT.hasStatus]+"'" unless completed? + # ignore hasStatus + # raise "#{@uri}: illegal task state, code is 201, but hasStatus is not Completed: '"+@metadata[OT.hasStatus]+"'" unless completed? raise "#{@uri}: illegal task state, code is 201, resultURI is no task-URI: '"+@metadata[OT.resultURI].to_s+ "'" unless @metadata[OT.resultURI] and @metadata[OT.resultURI].to_s.uri? end |