summaryrefslogtreecommitdiff
path: root/webapp/test.rb
blob: 75044da4575923135f40ce779cb9d3d9b859df3f (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')).post
      end
      response['Content-Type'] = 'text/uri-list'
      halt 202,task.uri.to_s+"\n"  
    end

  end
end