{"repo":"ezcater/activerecord-postgres_pub_sub","free":true,"listed":false,"github":"https://github.com/ezcater/activerecord-postgres_pub_sub","clone":"git clone https://github.com/ezcater/activerecord-postgres_pub_sub.git","description":"Support for PostgreSQL LISTEN and NOTIFY","language":"Ruby","stars":62,"topics":["library","postgres","postgresql","pub-sub","rubygem"],"license":"MIT","category":"databases-storage","readme_excerpt":"activerecord-postgres pub sub This gem contains support for PostgreSQL LISTEN and NOTIFY functionality: doc. Installation Add this line to your application's Gemfile: And then execute: $ bundle Or install it yourself as: $ gem install activerecord-postgres pub sub Usage Listener The Listener class is used to handle notification messages on one or more channels. The listener can be configured with three blocks: on notify : called whenever a notification is received. on start : called before receiving any notifications. on timeout : called based on a configurable timeout, when no notifications have been received. When creating a listener, the following configuration is supported: listen timeout : If set, the on timeout block will be called if no notifications are received within this period. (Default nil ). notify only : A payload string can be included in notifications. By default the listener ignores the payload and coalesces multiple notifications into a single call. When this option is false , the on notify block is called with the payload for each notification. (Default true ). base class : An Active Record class should you need to use a different base class (e.g. for multiple database support). (Default ActiveRecord::Base ). exclusive lock : Acquire a lock using with advisory lock prior to listening. This option ensures that a process as a singleton listener. (Default true ). Example: Generator This gem contains a Rails generator for a migration to add a trigger to notify","default_branch":null,"files":null,"tree":[],"storefront":"/r/ezcater","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ezcater/activerecord-postgres_pub_sub/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}