Method: Que::Listener#unlisten

Defined in:
lib/que/listener.rb

#unlistenObject



129
130
131
132
133
134
135
136
137
138
139
140
141
# File 'lib/que/listener.rb', line 129

def unlisten
  # Be sure to drain all notifications so that any code that uses this
  # connection later doesn't receive any nasty surprises.
  connection.execute "UNLISTEN *"
  connection.drain_notifications

  Que.internal_log :listener_unlisten, self do
    {
      backend_pid: connection.backend_pid,
      channel:     channel,
    }
  end
end