diff options
author | Christoph Helma <helma@in-silico.de> | 2010-03-15 13:41:04 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.de> | 2010-03-15 13:41:04 +0100 |
commit | 2cd6df36af248bdef73f18faf782d31b68a10775 (patch) | |
tree | b177c828c7c7a5ddc23b1e07a4a422345d1c9754 | |
parent | b910c13e5f0309a653c911dd7083baf6e513cf22 (diff) |
small modification to internal yaml representation
-rw-r--r-- | application.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/application.rb b/application.rb index 3ef7541..6bcc3d8 100644 --- a/application.rb +++ b/application.rb @@ -58,6 +58,7 @@ put '/:id/:status/?' do task.finished_at = DateTime.now task.pid = nil when "pid" + LOGGER.debug "PID = " + params[:pid].to_s task.pid = params[:pid] when "parent" task.parent = Task.first(:uri => params[:uri]) @@ -66,7 +67,12 @@ 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 |