Packages

A search deployment helper library. Aims to easy deployment and monitoring of distributed Manticore & Sphinx in a Linux environment

Current section

Files

Jump to
khafra_search lib khafra queue manage_table_consumer.ex
Raw

lib/khafra/queue/manage_table_consumer.ex

defmodule Khafra.Queue.ManageTableConsumer do
use Lapin.Connection
require Logger
def handle_deliver(_channel, message) do
case :erlang.binary_to_term(message.payload) do
{:record_op, record, operation} ->
operation.(record)
{:record_op, operation} ->
operation.()
other ->
Logger.debug(fn -> "Unhandled message: #{inspect(other)}" end)
end
:ok
end
end