Sha256: 4ef54301f09e28d8a29267c05ac568af7e993fa61357a822ea8591ee8208b02a
Contents?: true
Size: 763 Bytes
Versions: 19
Compression:
Stored size: 763 Bytes
Contents
module BuilderApm class DashboardController < ApplicationController def index if params[:clear] == 'true' keys = redis_client.zrange("builder_apm:timestamps", 0, -1) keys = keys.map { |key| "builder_apm:Request:#{key}" } # Delete base keys redis_client.pipelined do |pipeline| pipeline.del("builder_apm:timestamps") pipeline.del("builder_apm:errors") pipeline.del("builder_apm:n_plus_one") pipeline.del("builder_apm:slow") end debugger # Delete keys in chunks keys.each_slice(1000) do |key_chunk| redis_client.del(*key_chunk) unless key_chunk.empty? end end end end end
Version data entries
19 entries across 19 versions & 1 rubygems