Handle incoming items through the queue.

This commit is contained in:
Roger Braun 2017-05-06 12:34:40 +02:00
commit 22ddddce76
3 changed files with 10 additions and 6 deletions

View file

@ -5,6 +5,7 @@ defmodule Pleroma.Web.Federator do
require Logger
@websub Application.get_env(:pleroma, :websub)
@ostatus Application.get_env(:pleroma, :ostatus)
@max_jobs 10
def start_link do
@ -28,6 +29,11 @@ defmodule Pleroma.Web.Federator do
@websub.verify(websub)
end
def handle(:incoming_doc, doc) do
Logger.debug("Got document, trying to parse")
@ostatus.handle_incoming(doc)
end
def handle(type, payload) do
Logger.debug(fn -> "Unknown task: #{type}" end)
{:error, "Don't know what do do with this"}