Commit a06b9a3e authored by lain's avatar lain

Logging.

parent 67afd024
Pipeline #785 failed with stage
in 2 minutes and 21 seconds
......@@ -324,6 +324,7 @@ def fetch_object_from_id(id) do
if object = Object.get_cached_by_ap_id(id) do
{:ok, object}
else
Logger.info("Fetching #{id} via AP")
with {:ok, %{body: body, status_code: code}} when code in 200..299 <- @httpoison.get(id, [Accept: "application/activity+json"], follow_redirect: true, timeout: 10000, recv_timeout: 20000),
{:ok, data} <- Poison.decode(body),
nil <- Object.get_by_ap_id(data["id"]),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment