summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.ru2
-rw-r--r--lazar.rb6
2 files changed, 5 insertions, 3 deletions
diff --git a/config.ru b/config.ru
index 1616a96..ec39d1b 100644
--- a/config.ru
+++ b/config.ru
@@ -3,3 +3,5 @@ require 'opentox-ruby'
require 'config/config_ru'
set :app_file, __FILE__ # to get the view path right
run Sinatra::Application
+set :raise_errors, false
+set :show_exceptions, false \ No newline at end of file
diff --git a/lazar.rb b/lazar.rb
index 16327d8..fe65d63 100644
--- a/lazar.rb
+++ b/lazar.rb
@@ -35,7 +35,7 @@ get '/:id/?' do
case accept
when /application\/rdf\+xml/
s = OpenTox::Serializer::Owl.new
- s.add_model(url_for('/lazar',:full),lazar.metadata)
+ s.add_model(model.uri,lazar.metadata)
response['Content-Type'] = 'application/rdf+xml'
s.to_rdfxml
when /yaml/
@@ -113,8 +113,8 @@ post '/:id/?' do
halt 500, "Prediction of #{compound_uri} with #{@lazar.uri} failed."
end
elsif dataset_uri
- task = OpenTox::Task.create("Predict dataset",url_for("/#{@lazar.id}", :full)) do
- @lazar.predict_dataset(dataset_uri, @subjectid).uri
+ task = OpenTox::Task.create("Predict dataset",url_for("/#{@lazar.id}", :full)) do |task|
+ @lazar.predict_dataset(dataset_uri, @subjectid, task).uri
end
halt 503,task.uri+"\n" if task.status == "Cancelled"
halt 202,task.uri