diff options
author | mguetlein <martin.guetlein@gmail.com> | 2010-05-17 17:56:01 +0200 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2010-05-17 17:56:01 +0200 |
commit | fff8f16567766a6abbf77b734c194e563891542d (patch) | |
tree | ab89ee670c87dab2260a248edb88b3df714fa173 | |
parent | 6b8e7eed61c4f8e2585062c92a57a04b02b0d00e (diff) |
increase timeout
-rw-r--r-- | lib/task.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/task.rb b/lib/task.rb index 53a5376..f637588 100644 --- a/lib/task.rb +++ b/lib/task.rb @@ -1,7 +1,7 @@ LOGGER.progname = File.expand_path(__FILE__) -DEFAULT_TASK_MAX_DURATION = 500 -EXTERNAL_TASK_MAX_DURATION = 480 +DEFAULT_TASK_MAX_DURATION = 36000 #10h +EXTERNAL_TASK_MAX_DURATION = 36000 #10h $self_task=nil @@ -40,7 +40,11 @@ module OpenTox end def reload - result = RestClientWrapper.get(uri, {:accept => 'application/rdf+xml'}, false)#'text/x-yaml'}) + 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 @http_code = result.code reload_from_data(result, result.content_type, uri) end |