lib/postgres/vacuum/jobs/monitor_job.rb in postgres-vacuum-monitor-0.15.0 vs lib/postgres/vacuum/jobs/monitor_job.rb in postgres-vacuum-monitor-0.16.0

- old
+ new

@@ -9,9 +9,17 @@ LONG_TRANSACTIONS = 'LongTransactions' BLOCKED_QUERIES = 'BlockedQueries' CONNECTION_STATE = 'ConnectionState' CONNECTION_IDLE_TIME = 'ConnectionIdleTime' + def max_run_time + Postgres::Vacuum::Monitor.configuration.monitor_max_run_time_seconds.seconds + end + + def max_attempts + Postgres::Vacuum::Monitor.configuration.monitor_max_attempts + end + def perform(*) with_each_db_name_and_connection do |name, connection| connection.execute(Postgres::Vacuum::Monitor::Query.long_running_transactions).each do |row| reporter_class.report_event( LONG_TRANSACTIONS,