Merge branch 'fix-object-deletion-timeout' into 'develop'
Fix Activity.delete_all_by_object_ap_id/1 timeout so users can be deleted Closes #2704 See merge request pleroma/pleroma!3479
This commit is contained in:
commit
6aff3d3204
2 changed files with 2 additions and 1 deletions
|
@ -69,6 +69,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
- Checking activated Upload Filters for required commands.
|
- Checking activated Upload Filters for required commands.
|
||||||
- Remote users can no longer reappear after being deleted.
|
- Remote users can no longer reappear after being deleted.
|
||||||
- Deactivated users may now be deleted.
|
- Deactivated users may now be deleted.
|
||||||
|
- Deleting an activity with a lot of likes/boosts no longer causes a database timeout.
|
||||||
- Mix task `pleroma.database prune_objects`
|
- Mix task `pleroma.database prune_objects`
|
||||||
- Fixed rendering of JSON errors on ActivityPub endpoints.
|
- Fixed rendering of JSON errors on ActivityPub endpoints.
|
||||||
- Linkify: Parsing crash with URLs ending in unbalanced closed paren, no path separator, and no query parameters
|
- Linkify: Parsing crash with URLs ending in unbalanced closed paren, no path separator, and no query parameters
|
||||||
|
|
|
@ -302,7 +302,7 @@ defmodule Pleroma.Activity do
|
||||||
|> Queries.by_object_id()
|
|> Queries.by_object_id()
|
||||||
|> Queries.exclude_type("Delete")
|
|> Queries.exclude_type("Delete")
|
||||||
|> select([u], u)
|
|> select([u], u)
|
||||||
|> Repo.delete_all()
|
|> Repo.delete_all(timeout: :infinity)
|
||||||
|> elem(1)
|
|> elem(1)
|
||||||
|> Enum.find(fn
|
|> Enum.find(fn
|
||||||
%{data: %{"type" => "Create", "object" => ap_id}} when is_binary(ap_id) -> ap_id == id
|
%{data: %{"type" => "Create", "object" => ap_id}} when is_binary(ap_id) -> ap_id == id
|
||||||
|
|
Loading…
Reference in a new issue