Auto-archival of unclaimed asciicasts (GC) #333
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
This PR adds ability to auto-archive asciicasts that have been uploaded by anonymous users (from unknown/unregistered installations).
For users who haven't linked their local installation to their online account (via
asciinema auth
command) we're gonna display information about enabled archival in the upload result message, on each upload (or implicit upload whenasciinema rec
without arg used).The idea behind this feature is to "garbage collect" dead recordings (where "dead" == watched/shared, then forgotten/abandoned), which will clean up storage. It will also ensure the recordings that are preserved are linked to real user accounts, and these users can be reached (abuse reports etc).
Archival will not delete the recordings, only mark them as archived, which will result in hiding it from all listings, and showing "This recording has been archived" message for direct asciicast links. Actual removal from database and file store will happen N days after archival, and will be part of a separate PR.
Archival is disabled by default, and can be enabled by setting
ASCIICAST_GC_DAYS
env variable to the number of days after which anonymous recording is archived.We're going to enable this on asciinema.org.