diff options
author | mr <mr@mrautenberg.de> | 2011-05-25 13:37:06 +0200 |
---|---|---|
committer | mr <mr@mrautenberg.de> | 2011-05-25 13:37:06 +0200 |
commit | d5bf9fd2b7f4401c36d00ab6afb1a003fdb07d2f (patch) | |
tree | db88d9b1a7f01f7a24a597a05b293d9307dc1d3f /lib/task.rb | |
parent | 796ef9b86fcdcf5f9520b958c09cb37ae1374bf4 (diff) | |
parent | 52e73a3da8e99da9a0a973b6ef9934297bc6511e (diff) |
Merge branch 'development' of github.com:opentox/opentox-ruby into development
Diffstat (limited to 'lib/task.rb')
-rw-r--r-- | lib/task.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/task.rb b/lib/task.rb index 19f42d6..146a756 100644 --- a/lib/task.rb +++ b/lib/task.rb @@ -38,6 +38,7 @@ module OpenTox task = Task.new(task_uri.chomp) # measure current memory consumption +=begin memory = `free -m|sed -n '2p'`.split free_memory = memory[3].to_i + memory[6].to_i # include cache if free_memory < 20 # require at least 200 M free memory @@ -56,6 +57,7 @@ module OpenTox # return task # #raise "Server too busy to start a new task" #end +=end task_pid = Spork.spork(:logger => LOGGER) do LOGGER.debug "Task #{task.uri} started #{Time.now}" @@ -286,7 +288,8 @@ module OpenTox if @http_code == 202 raise "#{@uri}: illegal task state, code is 202, but hasStatus is not Running: '"+@metadata[OT.hasStatus]+"'" unless running? elsif @http_code == 201 - raise "#{@uri}: illegal task state, code is 201, but hasStatus is not Completed: '"+@metadata[OT.hasStatus]+"'" unless completed? + # ignore hasStatus + # raise "#{@uri}: illegal task state, code is 201, but hasStatus is not Completed: '"+@metadata[OT.hasStatus]+"'" unless completed? raise "#{@uri}: illegal task state, code is 201, resultURI is no task-URI: '"+@metadata[OT.resultURI].to_s+ "'" unless @metadata[OT.resultURI] and @metadata[OT.resultURI].to_s.uri? end |