mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-13 19:01:06 +00:00
Pruning docs and ability to turn off
This commit is contained in:
parent
8cc1691857
commit
07d187309e
4 changed files with 48 additions and 10 deletions
|
@ -94,6 +94,9 @@ class PostStates(StateGraph):
|
|||
"""
|
||||
For remote posts, sees if we can delete them every so often.
|
||||
"""
|
||||
# Skip all of this if the horizon is zero
|
||||
if settings.SETUP.REMOTE_PRUNE_HORIZON <= 0:
|
||||
return
|
||||
# To be a candidate for deletion, a post must be remote and old enough
|
||||
if instance.local:
|
||||
return
|
||||
|
|
|
@ -13,7 +13,11 @@ This release's major changes:
|
|||
most situations (the context switching was costing more than the gains from
|
||||
talking to other servers asynchronously).
|
||||
|
||||
* TBC
|
||||
* Old remote posts are now automatically pruned out of the database after a
|
||||
configurable horizon time, defaulting to 90 days. Posts from local users and
|
||||
posts that have been interacted with (liked, boosted, pinned) by local users
|
||||
are never deleted. You can change the deletion horizon with the
|
||||
``TAKAHE_REMOTE_PRUNE_HORIZON`` setting.
|
||||
|
||||
Minor changes also include:
|
||||
|
||||
|
@ -33,17 +37,16 @@ or use the image name ``jointakahe/takahe:0.10``.
|
|||
Upgrade Notes
|
||||
-------------
|
||||
|
||||
VAPID keys and Push notifications
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Remote Pruning
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
Takahē now supports push notifications if you supply a valid VAPID keypair as
|
||||
the ``TAKAHE_VAPID_PUBLIC_KEY`` and ``TAKAHE_VAPID_PRIVATE_KEY`` environment
|
||||
variables. You can generate a keypair via `https://web-push-codelab.glitch.me/`_.
|
||||
|
||||
Note that users of apps may need to sign out and in again to their accounts for
|
||||
the app to notice that it can now do push notifications. Some apps, like Elk,
|
||||
may cache the fact your server didn't support it for a while.
|
||||
Post pruning is now in and comes *enabled by default*, as it is not directly
|
||||
destructive (it will only delete content that has not been interacted with
|
||||
locally and which can be re-fetched).
|
||||
|
||||
Nevertheless, if you want to avoid post deletion triggering on your server at
|
||||
all, you should set the ``TAKAHE_REMOTE_PRUNE_HORIZON`` environment variable to
|
||||
``0``.
|
||||
|
||||
Migrations
|
||||
~~~~~~~~~~
|
||||
|
|
21
docs/releases/0.11.rst
Normal file
21
docs/releases/0.11.rst
Normal file
|
@ -0,0 +1,21 @@
|
|||
0.11
|
||||
====
|
||||
|
||||
*Released: Not Yet Released*
|
||||
|
||||
Notes TBD.
|
||||
|
||||
|
||||
Upgrade Notes
|
||||
-------------
|
||||
|
||||
VAPID keys and Push notifications
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Takahē now supports push notifications if you supply a valid VAPID keypair as
|
||||
the ``TAKAHE_VAPID_PUBLIC_KEY`` and ``TAKAHE_VAPID_PRIVATE_KEY`` environment
|
||||
variables. You can generate a keypair via `https://web-push-codelab.glitch.me/`_.
|
||||
|
||||
Note that users of apps may need to sign out and in again to their accounts for
|
||||
the app to notice that it can now do push notifications. Some apps, like Elk,
|
||||
may cache the fact your server didn't support it for a while.
|
|
@ -221,6 +221,17 @@ read-through cache that respects ``Cache-Control``, like Varnish, will
|
|||
also help if placed in front of Takahē.
|
||||
|
||||
|
||||
Remote Content Pruning
|
||||
----------------------
|
||||
|
||||
By default, Takahē will prune (delete) any remote posts or identities that
|
||||
haven't been interacted with after 90 days. You can change this using the
|
||||
``TAKAHE_REMOTE_PRUNE_HORIZON`` environment variable, which accepts an integer
|
||||
number of days as its value.
|
||||
|
||||
Setting this environment variable to ``0`` disables this feature entirely.
|
||||
|
||||
|
||||
Sentry.io integration
|
||||
---------------------
|
||||
|
||||
|
|
Loading…
Reference in a new issue