diff options
author | mguetlein <martin.guetlein@gmail.com> | 2010-09-10 11:58:54 +0200 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2010-09-10 11:58:54 +0200 |
commit | a6cc0c0557171fa4bf55032be5dfab652e6b735d (patch) | |
tree | 170a9a98e2e2867e1f4be9ab8d4bbd70caa8257f /reach_reports | |
parent | e0872937009571570d2292ce94f0760fd17c9aff (diff) |
create qmrf report as task
Diffstat (limited to 'reach_reports')
-rw-r--r-- | reach_reports/reach_application.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/reach_reports/reach_application.rb b/reach_reports/reach_application.rb index 74d35d7..8890ece 100644 --- a/reach_reports/reach_application.rb +++ b/reach_reports/reach_application.rb @@ -26,10 +26,16 @@ get '/reach_report/:type' do end post '/reach_report/:type' do - content_type "text/uri-list" + type = extract_type(params) - LOGGER.info "creating "+type+" report "+params.inspect - ReachReports.create_report(type,params,request.env["rack.input"]) + content_type "text/uri-list" + task_uri = OpenTox::Task.as_task( "Create "+type+" report", url_for("/reach_report/"+type, :full), params ) do + + LOGGER.info "creating "+type+" report "+params.inspect + ReachReports.create_report(type,params,request.env["rack.input"]) + end + halt 202,task_uri + end get '/reach_report/:type/:id' do |