Sha256: ec5c22a5eac755b02eb26e17e5b35f85c067d5b1610f679cf27465d1a4f129be

Contents?: true

Size: 626 Bytes

Versions: 2

Compression:

Stored size: 626 Bytes

Contents

module Splash
  module ConfigUtilities
    include Splash::Constants


    def flush_backend(options ={})
      config = get_config
      self.extend Splash::Backends
      self.extend Splash::Loggers
      log = get_logger
      log.info "Splash backend flushing"
      name  = (options[:name])? options[:name] : :execution_trace
      backend = get_backend name
      if backend.flush then
        return { :case => :quiet_exit, :more => "Splash backend #{name.to_s} flushed" }
      else
        return { :case => :configuration_error, :more => "Splash backend #{name.to_s} can't be flushed" }
      end
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
prometheus-splash-0.5.3 lib/splash/config/flush.rb
prometheus-splash-0.5.2 lib/splash/config/flush.rb