Sha256: 5c47381b8a309174454f141d3830c6b88b8ede48aff5ad90052534a646ca3482

Contents?: true

Size: 1001 Bytes

Versions: 1

Compression:

Stored size: 1001 Bytes

Contents

# frozen_string_literal: true

module Postgres
  module Vacuum
    class Configuration
      DEFAULT_LONG_RUNNING_TRANSACTION_THRESHOLD_SECONDS = 5 * 60
      DEFAULT_MONITOR_MAX_RUN_TIME_SECONDS = 60
      DEFAULT_MONITOR_MAX_ATTEMPTS = 1
      DEFAULT_MONITOR_STATEMENT_TIMEOUT_SECONDS = 10

      attr_accessor :monitor_reporter_class_name,
                    :long_running_transaction_threshold_seconds,
                    :monitor_max_run_time_seconds,
                    :monitor_max_attempts,
                    :monitor_statement_timeout_seconds

      def initialize
        self.monitor_reporter_class_name = nil
        self.long_running_transaction_threshold_seconds = DEFAULT_LONG_RUNNING_TRANSACTION_THRESHOLD_SECONDS
        self.monitor_max_run_time_seconds = DEFAULT_MONITOR_MAX_RUN_TIME_SECONDS
        self.monitor_max_attempts = DEFAULT_MONITOR_MAX_ATTEMPTS
        self.monitor_statement_timeout_seconds = DEFAULT_MONITOR_STATEMENT_TIMEOUT_SECONDS
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
postgres-vacuum-monitor-0.17.0 lib/postgres/vacuum/configuration.rb