Clean up bookmarks after prune_objects #544

Merged
floatingghost merged 2 commits from ilja/akkoma:clean_up_bookmarks_after_prune_objects into develop 2023-05-22 21:28:49 +00:00
Contributor

See https://meta.akkoma.dev/t/unable-to-retrieve-more-than-20-bookmarks/449/7

After pruning objects, it's possible that some bookmarks reference non-existing objects. For that reason, we clean up such bookmarks after running prune_objects. Note that we only need this cleaning when the --keep-threads wasn't used, because that option wont delete objects when there are bookmarks.

I also refactored some stuff to the setup, because I saw a lot of reused code.

See <https://meta.akkoma.dev/t/unable-to-retrieve-more-than-20-bookmarks/449/7> After pruning objects, it's possible that some bookmarks reference non-existing objects. For that reason, we clean up such bookmarks after running prune_objects. Note that we only need this cleaning when the `--keep-threads` wasn't used, because that option wont delete objects when there are bookmarks. I also refactored some stuff to the setup, because I saw a lot of reused code.
ilja added 1 commit 2023-05-21 10:06:49 +00:00
ci/woodpecker/pr/woodpecker Pipeline is pending Details
c7fb78cc32
Move deadline and old_insert_date to setup
Several tests for prune_objetcs need a date older than the deadline for pruning, so I moved that to the setup
ilja added 1 commit 2023-05-21 11:04:12 +00:00
ci/woodpecker/pr/woodpecker Pipeline is pending Details
f49e9e6d4c
Clean up bookmarks after prune_objects
When doing prune_objects, it's possible that bookmarked objects are deleted.
This gave problems when fetching the bookmark TL.
Here we clean up the bookmarks during pruning in the case were it's possible that bookmarked objects are deleted.
ilja changed title from WIP: Move deadline and old_insert_date to setup to Clean up bookmarks after prune_objects 2023-05-21 11:04:56 +00:00

this looks good, thanks a lot!

this looks good, thanks a lot!
floatingghost merged commit 6225f24f5f into develop 2023-05-22 21:28:49 +00:00
floatingghost deleted branch clean_up_bookmarks_after_prune_objects 2023-05-22 21:28:49 +00:00
Sign in to join this conversation.
No description provided.