diff options
author | mguetlein <martin.guetlein@gmail.com> | 2010-06-25 20:44:49 +0200 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2010-06-25 20:44:49 +0200 |
commit | 5cdd09a98b1edfb8be3e4693a4b129b9b35ad9f2 (patch) | |
tree | fa70316a483282d7f77306c04bc4aca6dc72ad7a /lib/task.rb | |
parent | e5838e7607533b5087a89949fea15f694f184b17 (diff) | |
parent | ba287d744cdc929df7e3ed3986151b813ddf8fb1 (diff) |
resolved conflicts, replace text/x-yaml with application/x-yaml, acceess classification values w/o confidence
Diffstat (limited to 'lib/task.rb')
-rw-r--r-- | lib/task.rb | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/task.rb b/lib/task.rb index 60c1159..88bcb71 100644 --- a/lib/task.rb +++ b/lib/task.rb @@ -1,8 +1,5 @@ LOGGER.progname = File.expand_path(__FILE__) -DEFAULT_TASK_MAX_DURATION = 10*60*60 -EXTERNAL_TASK_MAX_DURATION = 10*60*60 - $self_task=nil module OpenTox @@ -40,18 +37,14 @@ module OpenTox end def reload - if uri=~ /188.40.32.88/ || uri=~/in-silico.ch/ - result = RestClientWrapper.get(uri, {:accept => 'text/x-yaml'}, false) - else - result = RestClientWrapper.get(uri, {:accept => 'application/rdf+xml'}, false) - end + result = RestClientWrapper.get(uri, {:accept => 'application/rdf+xml'}, false)#'application/x-yaml'}) @http_code = result.code reload_from_data(result, result.content_type, uri) end def reload_from_data( data, content_type, base_uri ) case content_type - when /text\/x-yaml/ + when /yaml/ task = YAML.load data TASK_ATTRIBS.each do |a| raise "task yaml data invalid, key missing: "+a.to_s unless task.has_key?(a) |