def as_resultset(targets)
      result_array = begin
                       yield
                     rescue StandardError => e
                       @logger.warn(e)
                       # CODEREVIEW how should we fail if there's an error?
                       Array(Bolt::Result.from_exception(targets[0], e))
                     end
      Bolt::ResultSet.new(result_array)
    end
def as_resultset(targets)
      result_array = begin
                       yield
                     rescue StandardError => e
                       @logger.warn(e)
                       # CODEREVIEW how should we fail if there's an error?
                       Array(Bolt::Result.from_exception(targets[0], e))
                     end
      Bolt::ResultSet.new(result_array)
    end
This handles running the job, catching errors, and turning the result
 into a result set