Class: PGMQ::NotifyThrottle

Inherits:
Object
  • Object
show all
Defined in:
lib/pgmq/notify_throttle.rb

Overview

Represents the NOTIFY throttle configuration for a queue

Examples:

Inspecting notification configuration

throttles = client.list_notify_insert_throttles
throttles.each do |t|
  puts "#{t.queue_name}: #{t.throttle_interval_ms}ms (last notified: #{t.last_notified_at})"
end

Class Method Summary collapse

Class Method Details

.new(row) ⇒ NotifyThrottle

Creates a new NotifyThrottle from a database row

Parameters:

  • row (Hash)

    database row from PG result

Returns:



16
17
18
19
20
21
22
# File 'lib/pgmq/notify_throttle.rb', line 16

def new(row, **)
  super(
    queue_name: row["queue_name"],
    throttle_interval_ms: row["throttle_interval_ms"],
    last_notified_at: row["last_notified_at"]
  )
end