lib/choria/orchestrator/task.rb in choria-colt-0.5.1 vs lib/choria/orchestrator/task.rb in choria-colt-0.6.0

- old
+ new

@@ -63,11 +63,11 @@ def result_set @result_set ||= ResultSet.new(on_result: @on_result) end def rpc_results=(results) - pending_results, completed_results = results.partition { |res| res[:data][:exitcode] == -1 } - @pending_targets ||= pending_results.map { |res| res[:sender] } + completed_results = results.reject { |res| res[:data][:exitcode] == -1 } + @pending_targets ||= results.map { |res| res[:sender] } new_results = completed_results.select { |res| @pending_targets.include? res[:sender] } new_results.each do |res| logger.debug "New result for task ##{@id}: #{res}" result_set.integrate_result(res)