Sha256: d20a84603e96d8c92cda40d0a3d1c61abf7f23c27fa6b0f3f31fd0057b3d94fd

Contents?: true

Size: 801 Bytes

Versions: 1

Compression:

Stored size: 801 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 = 10
      DEFAULT_MONITOR_MAX_ATTEMPTS = 1

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

      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
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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