summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2012-02-20 16:33:40 +0100
committerAndreas Maunz <andreas@maunz.de>2012-02-20 16:33:40 +0100
commit2b54733514e1c6e91b0397c70b441fc7c92e1db5 (patch)
tree478eb3571cbb259d8f8bcdde4cec81e2553e9818
parente77cc376aaff8ca481fdace6d5795c5b5feb0e87 (diff)
Support for progress (task)
-rw-r--r--application.rb4
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"