summaryrefslogtreecommitdiff
path: root/test.rb
blob: dc5ac9f39a1b5a4739b135fdf9955a0af82f2d68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#for testing the error handling

module OpenTox
  class Application < Service
    
    post '/test/wait_for_error_in_task/?' do
      task = OpenTox::Task.run("wait_for_error_in_task",@uri,@subjectid) do |task|
        sleep 1
        uri = OpenTox::Dataset.new(File.join($dataset[:uri],'test/error_in_task'), @subjectid).post
      end
      response['Content-Type'] = 'text/uri-list'
      halt 202,task.uri.to_s+"\n"  
    end

  end
end