This commit is contained in:
FloatingGhost 2021-12-30 18:03:09 +00:00
parent 4e7e95a17e
commit 3252ed0f54
2 changed files with 6 additions and 1 deletions

View file

@ -129,6 +129,7 @@ defmodule Pleroma.Elasticsearch do
{:error, %{reason: err}} -> {:error, %{reason: err}} ->
Logger.error("Could not bulk put activity: #{err}") Logger.error("Could not bulk put activity: #{err}")
:skipped :skipped
{:ok, %{body: body}} -> {:ok, %{body: body}} ->
IO.inspect(body) IO.inspect(body)
:skipped :skipped
@ -159,6 +160,7 @@ defmodule Pleroma.Elasticsearch do
{:error, %{reason: err}} -> {:error, %{reason: err}} ->
Logger.error("Could not bulk put users: #{err}") Logger.error("Could not bulk put users: #{err}")
:skipped :skipped
{:ok, %{body: body}} -> {:ok, %{body: body}} ->
IO.inspect(body) IO.inspect(body)
:skipped :skipped
@ -188,6 +190,7 @@ defmodule Pleroma.Elasticsearch do
{:error, %{reason: err}} -> {:error, %{reason: err}} ->
Logger.error("Could not bulk put hashtags: #{err}") Logger.error("Could not bulk put hashtags: #{err}")
:skipped :skipped
{:ok, %{body: body}} -> {:ok, %{body: body}} ->
IO.inspect(body) IO.inspect(body)
:skipped :skipped

View file

@ -542,7 +542,9 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
Pleroma.Elasticsearch.put_by_id(:activity, activity.id) Pleroma.Elasticsearch.put_by_id(:activity, activity.id)
end end
def handle_after_transaction(%Pleroma.Activity{data: %{"type" => "Delete", "deleted_activity_id" => id}}) do def handle_after_transaction(%Pleroma.Activity{
data: %{"type" => "Delete", "deleted_activity_id" => id}
}) do
Pleroma.Elasticsearch.delete_by_id(:activity, id) Pleroma.Elasticsearch.delete_by_id(:activity, id)
end end