shigoto_notifier (shigoto v1.9.12)
View SourceListens for PostgreSQL NOTIFY events on the shigoto_jobs_insert channel
and triggers immediate polling on the relevant queue. Falls back to
regular polling if the notification connection drops.
A notification is an optimisation, never the only path: NOTIFY has no replay,
so anything published while the listener was away is gone. minato says when that
happened, and this process answers it by polling every queue once, which is the
catch up the missed notifications would have caused.
Requires notifier config with database connection details:
{shigoto, [
{pool, my_db},
{notifier, #{host => "localhost", port => 5432,
database => "mydb", user => "postgres", password => "secret"}}
]}Without notifier config, this process is not started and shigoto
relies solely on polling.