From 0cf1fbcfae7f618f188f8b44051e5fc0724f8728 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Mon, 10 May 2010 18:45:22 +0200 Subject: Validation service integrated --- lib/task.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/task.rb') diff --git a/lib/task.rb b/lib/task.rb index 181b895..8f87f45 100644 --- a/lib/task.rb +++ b/lib/task.rb @@ -1,7 +1,7 @@ LOGGER.progname = File.expand_path(__FILE__) -DEFAULT_TASK_MAX_DURATION = 360 -EXTERNAL_TASK_MAX_DURATION = 120 +DEFAULT_TASK_MAX_DURATION = 3600 +EXTERNAL_TASK_MAX_DURATION = 1200 $self_task=nil -- cgit v1.2.3 From 1d0c46a9711050e116147437fbb334bd800324f3 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Wed, 12 May 2010 12:31:39 +0200 Subject: Modification for new RestClient: body instead of to_s --- lib/task.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'lib/task.rb') 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) -- cgit v1.2.3