diff options
author | mr <mr@mrautenberg.de> | 2011-05-05 11:49:46 +0200 |
---|---|---|
committer | mr <mr@mrautenberg.de> | 2011-05-05 11:49:46 +0200 |
commit | 2de3bef8b5e29114961dfe2dbad9c379ebc359f6 (patch) | |
tree | 919c75e1e40b511c2fcd13c1c59cce3ca87ca43f /application.rb | |
parent | 7e230a5265c125aa409d0ebfdab73fbc1061d5c2 (diff) |
fix cancelling task on deletion
Diffstat (limited to 'application.rb')
-rw-r--r-- | application.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/application.rb b/application.rb index 0123585..98d7fea 100644 --- a/application.rb +++ b/application.rb @@ -27,7 +27,7 @@ helpers do private def delete_model(model, subjectid=nil) task = OpenTox::Task.create("Deleting model: #{model.uri}",url_for("/delete",:full)) do |task| - begin RestClient.put(File.join(model.task_uri, 'Cancelled'),subjectid) if model.task_uri rescue LOGGER.warn "Cannot cancel task #{model.task_uri}" end + begin OpenTox::RestClientWrapper.put(File.join(model.task_uri, "Cancelled"), "Cancelled",{:subjectid => subjectid}) if model.task_uri rescue LOGGER.warn "Cannot cancel task #{model.task_uri}" end task.progress(15) delete_dependent(model.uri, subjectid) if model.uri task.progress(30) |