Allow the prune_objects task to delete orphaned activities #427
No reviewers
Labels
No labels
approved, awaiting change
bug
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs docs
needs tests
not a bug
planned
pleroma_api
privacy
question
static_fe
triage
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma#427
Loading…
Reference in a new issue
No description provided.
Delete branch "ilja/akkoma:delete_orphaned_activities"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This builds further on #350 , but i made it a separate PR so we can keep changes smaller in the hope that this makes reviewing easier. Do let me know if it's better to keep the whole thing as one PR.
After pruning objects, we still have a whole bunch of activities that don't link to anything existing any more. Here we find and delete those activities.
I made this an option because it may cause extra load, time, and risk.
Note that I also check what tables we have in the DB. As explained in the comments of the test, this is because the objects that the activities point to can be stored in different tables. Currently I see three of them, but it's possible we add more tables in the future. If those tables also hold objects and we don't check there, we may delete activities who shouldn't be deleted. For that reason I make a test fail when a new table is added.
b1ab4792af
to7286763011
7286763011
to5e40707baa
5e40707baa
tof2506a1ed2
f2506a1ed2
toa56bab0cb5
a56bab0cb5
to0d0c540a59
4aea168f05
to2f7bd7acb9
WIP: Allow the prune_objects task to delete orphaned activitiesto Allow the prune_objects task to delete orphaned activities700d248c74
to910fbf1747
910fbf1747
tob4fbe9b517
b4fbe9b517
to328b4d93b7
dw about the conflict that was caused by the other merge, i'll handle it
thanks a lot! this looks like it was a tonne of work, but very useful
merged via
f56e3098ef
thankiessss
Pull request closed