diff options
author | Andreas Maunz <andreas@maunz.de> | 2012-02-20 16:33:40 +0100 |
---|---|---|
committer | Andreas Maunz <andreas@maunz.de> | 2012-02-20 16:33:40 +0100 |
commit | 2b54733514e1c6e91b0397c70b441fc7c92e1db5 (patch) | |
tree | 478eb3571cbb259d8f8bcdde4cec81e2553e9818 | |
parent | e77cc376aaff8ca481fdace6d5795c5b5feb0e87 (diff) |
Support for progress (task)
-rw-r--r-- | application.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/application.rb b/application.rb index f806271..735a4d1 100644 --- a/application.rb +++ b/application.rb @@ -361,13 +361,13 @@ post '/:id/pcdesc' do response['Content-Type'] = 'text/uri-list' raise "No PC type given" unless params["pc_type"] - task = OpenTox::Task.create("PC descriptor calculation for dataset ", @uri) do + task = OpenTox::Task.create("PC descriptor calculation for dataset ", @uri) do |task| types = params[:pc_type].split(",") if types.include?("joelib") Rjb.load(nil,["-Xmx64m"]) s = Rjb::import('JoelibFc') end - OpenTox::Algorithm.pc_descriptors( { :dataset_uri => @uri, :pc_type => params[:pc_type], :rjb => s } ) + OpenTox::Algorithm.pc_descriptors( { :dataset_uri => @uri, :pc_type => params[:pc_type], :rjb => s, :task => task } ) end raise OpenTox::ServiceUnavailableError.newtask.uri+"\n" if task.status == "Cancelled" halt 202,task.uri.to_s+"\n" |