summaryrefslogtreecommitdiff
path: root/lib/task.rb
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2010-05-12 12:31:39 +0200
committerChristoph Helma <helma@in-silico.ch>2010-05-12 12:31:39 +0200
commit1d0c46a9711050e116147437fbb334bd800324f3 (patch)
tree267b7815a9a00f73f254db5d47f6299759071d95 /lib/task.rb
parent0cf1fbcfae7f618f188f8b44051e5fc0724f8728 (diff)
Modification for new RestClient: body instead of to_s
Diffstat (limited to 'lib/task.rb')
-rw-r--r--lib/task.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/task.rb b/lib/task.rb
index 8f87f45..66d39f4 100644
--- a/lib/task.rb
+++ b/lib/task.rb
@@ -1,8 +1,5 @@
LOGGER.progname = File.expand_path(__FILE__)
-DEFAULT_TASK_MAX_DURATION = 3600
-EXTERNAL_TASK_MAX_DURATION = 1200
-
$self_task=nil
module OpenTox
@@ -40,14 +37,14 @@ module OpenTox
end
def reload
- result = RestClientWrapper.get(uri, {:accept => 'application/rdf+xml'}, false)#'text/x-yaml'})
+ 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)