Handle incoming items through the queue.
This commit is contained in:
parent
7e65cad9fe
commit
22ddddce76
3 changed files with 10 additions and 6 deletions
|
|
@ -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"}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue