diff --git a/lib/kadeploy3/server/debug.rb b/lib/kadeploy3/server/debug.rb index a2995689e4c7b19f97cf3c3f8552b4e35bf46dda..4761b2e6182e5058e602b669c38cb30517e1fa54 100644 --- a/lib/kadeploy3/server/debug.rb +++ b/lib/kadeploy3/server/debug.rb @@ -95,6 +95,12 @@ module Debug end end + def read() + @lock.synchronize do + @output + end + end + def pop() @lock.synchronize do ret = @output @@ -182,6 +188,21 @@ module Debug end end + def read(node = nil) + @lock.synchronize do + if node + @debug[node] + else + ret = '' + @debug.each_key do |n| + ret << @debug[n] if @debug[n] + end + (ret.empty? ? nil : ret) + end + end + end + + def empty?() ret = true @lock.synchronize do diff --git a/lib/kadeploy3/server/kaworkflow.rb b/lib/kadeploy3/server/kaworkflow.rb index b544676b8ef5955f1080718918596d97d4571e5c..ca8a683d7d933821c314ead2ac60a9ffec2b73a2 100644 --- a/lib/kadeploy3/server/kaworkflow.rb +++ b/lib/kadeploy3/server/kaworkflow.rb @@ -691,13 +691,13 @@ module Kaworkflow error_not_found! if info[:workflows] and cluster and !info[:workflows][cluster] if info[:workflows] and info[:workflows][cluster] - info[:workflows][cluster].output.pop unless info[:workflows][cluster].done? + info[:workflows][cluster].output.read unless info[:workflows][cluster].done? else log = '' - log << info[:output].pop + log << info[:output].read if info[:workflows] info[:workflows].each_value do |workflow| - log << workflow.output.pop unless workflow.done? + log << workflow.output.read unless workflow.done? end end log @@ -710,7 +710,7 @@ module Kaworkflow break if info[:error] error_not_found! if (node and !info[:nodelist].include?(node)) or !info[:debugger] - info[:debugger].pop(node) + info[:debugger].read(node) end end @@ -774,4 +774,3 @@ module Kaworkflow end end -