Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Feature: Implement purge_media_cache admin API #902
Conversation
erikjohnston
added some commits
Jun 29, 2016
erikjohnston
assigned
NegativeMjark
Jun 29, 2016
erikjohnston
changed the title from
Implement purge_media_cache admin API
to
Feature: Implement purge_media_cache admin API
Jun 29, 2016
NegativeMjark
commented on an outdated diff
Jun 29, 2016
synapse/rest/media/v1/media_repository.py
| + else: | ||
| + continue | ||
| + | ||
| + try: | ||
| + os.removedirs(full_dir) | ||
| + except OSError: | ||
| + pass | ||
| + | ||
| + thumbnail_dir = self.filepaths.remote_media_thumbnail_dir( | ||
| + origin, file_id | ||
| + ) | ||
| + shutil.rmtree(thumbnail_dir, ignore_errors=True) | ||
| + | ||
| + yield self.store.delete_remote_media(origin, media_id) | ||
| + try: | ||
| + os.removedirs(thumbnail_dir) |
NegativeMjark
Contributor
|
|
LGTM |
erikjohnston
merged commit aac546c
into
develop
Jun 29, 2016
9 of 10 checks passed
Sytest Dendron (Commit)
Build #198 origin/erikj/expire_media failed in 23 min
Details
Flake8 + Packaging (Commit)
Build #1082 origin/erikj/expire_media succeeded in 35 sec
Details
Flake8 + Packaging (Merged PR)
Build finished.
Details
Sytest Dendron (Merged PR)
Build finished.
Details
Sytest Postgres (Commit)
Build #1038 origin/erikj/expire_media succeeded in 5 min 47 sec
Details
Sytest Postgres (Merged PR)
Build finished.
Details
Sytest SQLite (Commit)
Build #1054 origin/erikj/expire_media succeeded in 5 min 35 sec
Details
Sytest SQLite (Merged PR)
Build finished.
Details
Unit Tests (Commit)
Build #1121 origin/erikj/expire_media succeeded in 1 min 26 sec
Details
Unit Tests (Merged PR)
Build finished.
Details
richvdh
deleted the
erikj/expire_media
branch
Dec 1, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
erikjohnston commentedJun 29, 2016
•
edited
Adds an API to purge old remote media that has been locally cached. API:
This purges all cached remote media that was last accessed before the time given by
before_ts.The requester must be a server admin.