Skip to content

Location of Listener class so it will listen forever #20

@augustosamame

Description

@augustosamame

I'd like to use this gem to handle PG NOTIFYs from another project's db. Seems like an ideal use case. However, I don't understand where I should run the Listener class so it will run forever in my Rails project.
If I run it on demand, with a timeout, it defeats the purpose of "listening" to the PostgreSQL DB's notifys.
I'm using Puma, which is multithreaded so should I just place the Listener Class in an initializer and it will block a single worker? Should I use sidekiq instead?
Thanks in advance on any clarity you can provide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions