Sha256: 3f94e83ad2efaac7cb18e84e3f395c19543d8847ef2c044775a56ce8d1c1db07

Contents?: true

Size: 956 Bytes

Versions: 2

Compression:

Stored size: 956 Bytes

Contents

module GarbageMan
  class Config
    @@gc_health_check_request_path = '/gc_health_check'
    def self.gc_health_check_request_path; @@gc_health_check_request_path; end

    @@gc_yaml_file = nil
    def self.gc_yaml_file; @@gc_yaml_file ||= "./data/gc.yml"; end
    def self.gc_yaml_file=(file); @@gc_yaml_file = file; end

    def self.gc_config
      begin
        File.exists?(self.gc_yaml_file) ? YAML.load_file(self.gc_yaml_file) : nil
      rescue Exception => e
        nil
      end
    end

    @@thin_config = nil
    def self.thin_config; @@thin_config ||= YAML.load_file("./config/thin.yml"); end

    @@enable_gc_file = "./data/enable_gc"
    def self.enable_gc_file; @@enable_gc_file; end

    def self.num_request_before_collecting; 20; end
    # absolutely make sure we are in the pool again before selecting next server
    def self.num_request_before_selecting_next_server; 10; end
    def self.min_servers_to_disable_gc; 2; end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
garbageman-0.1.14 lib/garbageman/config.rb
garbageman-0.1.13 lib/garbageman/config.rb