synapse-product/synapse/rest/media/v1
Patrick Cloke 303b40b988
Do not wait for background updates to complete do expire URL cache. (#13657)
Media downloaded as part of a URL preview is normally deleted after two days.
However, while a background database migration is running, the process is
stopped. A long-running database migration can therefore cause the media
store to fill up with old preview files.

This logic was added in #2697 to make sure that we didn't try to run the expiry
without an index on `local_media_repository.created_ts`; the original logic that
needs that index was added in #2478 (in `get_url_cache_media_before`, as
amended by 93247a424a), and is still present.

Given that the background update was added before Synapse v1.0.0, just drop
this check and assume the index exists.
2022-08-30 07:15:54 -04:00
..
__init__.py Relax ignore-missing-imports for modules that have stubs now and update mypy (#11006) 2021-10-08 14:49:41 +01:00
_base.py Remove unnecessary pass statements. (#12206) 2022-03-11 07:06:21 -05:00
config_resource.py Use direct references for configuration variables (part 5). (#10897) 2021-09-24 07:25:21 -04:00
download_resource.py Add Cross-Origin-Resource-Policy header to thumbnail and download media endpoints (#12944) 2022-06-27 14:44:05 +01:00
filepath.py Fix media repository failing when media store path contains symlinks (#11446) 2021-12-02 16:05:24 +00:00
media_repository.py Prevent local quarantined media from being claimed by media retention (#12972) 2022-06-07 10:53:47 +00:00
media_storage.py Uniformize spam-checker API, part 5: expand other spam-checker callbacks to return Tuple[Codes, dict] (#13044) 2022-07-11 16:52:10 +00:00
oembed.py Fix preview of imgur and Tenor URLs. (#11669) 2022-01-18 13:20:24 -05:00
preview_html.py fix linting error from the 1.61.1 main -> develop merge 2022-06-28 16:47:04 +01:00
preview_url_resource.py Do not wait for background updates to complete do expire URL cache. (#13657) 2022-08-30 07:15:54 -04:00
storage_provider.py Use ParamSpec in type hints for synapse.logging.context (#12150) 2022-03-08 15:58:14 +00:00
thumbnail_resource.py Provide more info why we don't have any thumbnails to serve (#13038) 2022-07-15 11:42:21 -05:00
thumbnailer.py Fix potential thumbnail memory leaks. (#12932) 2022-06-01 10:57:49 +00:00
upload_resource.py Remove HomeServer.get_datastore() (#12031) 2022-02-23 11:04:02 +00:00