Postgrex.Notifications.listen
You're seeing just the function
listen
, go back to Postgrex.Notifications module for more information.
Specs
Listens to an asynchronous notification channel using the LISTEN
command.
A message {:notification, connection_pid, ref, channel, payload}
will be
sent to the calling process when a notification is received.
It returns {:ok, reference}
. It may also return {:eventually, reference}
if the notification process is not currently connected to the database and
it was started with :sync_connect
set to false or :auto_reconnect
set
to true. The reference
can be used to issue an unlisten/3
command.
Options
:timeout
- Call timeout (default:5000
)