diff options
author | Martin Gütlein <martin.guetlein@gmail.com> | 2010-04-28 10:17:16 +0200 |
---|---|---|
committer | Martin Gütlein <martin.guetlein@gmail.com> | 2010-04-28 10:17:16 +0200 |
commit | b7763b32a06c37271f05f8bd9e3e0fb12a2aeae5 (patch) | |
tree | 4fd4a448095e5079cc918a5e909834be20dd2c14 | |
parent | ea91e82476e7d4d0cccb79f1915c536a22e654ff (diff) |
return 202 for tasks
-rw-r--r-- | lazar.rb | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -180,13 +180,14 @@ post '/:id/?' do # create prediction elsif dataset_uri response['Content-Type'] = 'text/uri-list' - OpenTox::Task.as_task do + task_uri = OpenTox::Task.as_task do input_dataset = OpenTox::Dataset.find(dataset_uri) input_dataset.compounds.each do |compound_uri| lazar.classify(compound_uri,prediction) unless lazar.database_activity?(compound_uri,prediction) end uri = prediction.save.chomp - end + end + halt 202,task_uri end end |