LISTEN / NOTIFY examples

125 views
Skip to first unread message

Perry Smith

unread,
Apr 26, 2013, 9:36:13 PM4/26/13
to rub...@googlegroups.com
I want to explore using LISTEN / NOTIFY with a new Rails 4 project and its ActionController::Live facility. 

Are there any examples that I can start from that use the wait_for_notify interface?

Has anyone else been down this path yet?

Thank you,
Perry

Lars Kanis

unread,
Apr 27, 2013, 9:51:15 AM4/27/13
to rub...@googlegroups.com, Perry Smith
Am 27.04.2013 03:36, schrieb Perry Smith:
I want to explore using LISTEN / NOTIFY with a new Rails 4 project and its ActionController::Live facility. 

Are there any examples that I can start from that use the wait_for_notify interface?

Nick Gauthier posted an example to use ActionController::Live with LISTEN/NOTIFY: http://ngauthier.com/2013/02/rails-4-sse-notify-listen.html

Alternatively to issuing NOTIFY from after_save, you may also use a trigger or rule on a table instead.

Regards,
Lars

Ryan Smith

unread,
Aug 4, 2013, 11:42:51 AM8/4/13
to rub...@googlegroups.com, Perry Smith, la...@greiz-reinsdorf.de
queue_classic has been using LISTEN/NOTIFY for years. Here is an example of how we use the construct: https://github.com/ryandotsmith/queue_classic/blob/master/lib/queue_classic/conn.rb#L42-47
Reply all
Reply to author
Forward
0 new messages