diff options
-rw-r--r-- | config.ru | 2 | ||||
-rw-r--r-- | lazar.rb | 6 |
2 files changed, 5 insertions, 3 deletions
@@ -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 @@ -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 |