diff options
author | Christoph Helma <helma@in-silico.de> | 2010-03-16 19:42:55 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.de> | 2010-03-16 19:42:55 +0100 |
commit | 6158118c616ea9d2c97628c73e0d06931dae1e64 (patch) | |
tree | 610a49df034c874dabf88f94f746b6b1b03859bb | |
parent | 2cd6df36af248bdef73f18faf782d31b68a10775 (diff) |
initial test for dataset prediction added
-rw-r--r-- | application.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/application.rb b/application.rb index 6bcc3d8..75f4958 100644 --- a/application.rb +++ b/application.rb @@ -54,11 +54,13 @@ put '/:id/:status/?' do task.status = params[:status] unless /pid|parent/ =~ params[:status] case params[:status] when "completed" + + LOGGER.debug "Task " + params[:id].to_s + " completed" task.resource = params[:resource] task.finished_at = DateTime.now task.pid = nil when "pid" - LOGGER.debug "PID = " + params[:pid].to_s + #LOGGER.debug "PID = " + params[:pid].to_s task.pid = params[:pid] when "parent" task.parent = Task.first(:uri => params[:uri]) @@ -67,12 +69,7 @@ put '/:id/:status/?' do task.pid = nil RestClient.put url_for("/#{self.parent.id}/#{params[:status]}"), {} unless self.parent.nil? # recursevly kill parent tasks end - begin task.save - rescue - sleep 0.1 - task.save - end end delete '/:id/?' do |