nil).select("id,first_name,last_name").find_in_batches do |people| People.transaction do people.each(ActiveRecord::Base.connection_config[:pool]) do |person| ActiveRecord::Base.connection_pool.with_connection do |conn| set_full_name = conn.quote("#{person.first_name} #{person.last_name}") conn.execute("#{update_sql} #{set_full_name} where id = #{person.id} ") end end end end
false end def enable(feature, context) redis.sadd(feature) end def disable(feature, context) redis.srem(feature) end private def redis Redis::Namespace.new("rollout", redis: $redis) end end