Amber Brown
32e7c9e7f2
Run Black. ( #5482 )
2019-06-20 19:32:02 +10:00
Amber Brown
7efd1d87c2
Run black on the rest of the storage module ( #4996 )
2019-04-03 10:07:29 +01:00
Erik Johnston
05f98a2224
Keep track of last access time for local media
2018-01-17 10:24:43 +00:00
Erik Johnston
b30cd5b107
Remove dead code related to default thumbnails
2018-01-09 14:38:33 +00:00
Richard van der Hoff
7098b65cb8
Fix error on sqlite 3.7
...
Create the url_cache index on local_media_repository as a background update, so
that we can detect whether we are on sqlite or not and create a partial or
complete index accordingly.
To avoid running the cleanup job before we have built the index, add a bailout
which will defer the cleanup if the bg updates are still running.
Fixes https://github.com/matrix-org/synapse/issues/2572 .
2017-11-21 11:14:17 +00:00
Slavi Pantaleev
805196fbeb
Avoid no-op media deletes
...
If there are no media entries to delete,
avoid creating transactions, prepared statements
and unnecessary log entries.
Signed-off-by: Slavi Pantaleev <slavi@devture.com>
2017-11-04 09:50:15 +02:00
Erik Johnston
768f00dedb
Up the limits on number of url cache entries to delete at one time
2017-09-28 14:27:27 +01:00
Erik Johnston
93247a424a
Only pull out local media that were for url cache
2017-09-28 13:48:14 +01:00
Erik Johnston
7a44c01d89
Fix typo
2017-09-28 12:46:04 +01:00
Erik Johnston
ae79764fe5
Change expires column to expires_ts
2017-09-28 12:37:53 +01:00
Erik Johnston
9ccb4226ba
Delete expired url cache data
2017-09-28 12:18:06 +01:00
Erik Johnston
7fe8ed1787
Store URL cache preview downloads seperately
...
This makes it easier to clear old media out at a later date
2017-06-23 11:14:11 +01:00
Erik Johnston
b8b936a6ea
Add API to quarantine media
2017-06-19 17:39:21 +01:00
Erik Johnston
a70688445d
Implement purge_media_cache admin API
2016-06-29 14:57:59 +01:00
Erik Johnston
314b146b2e
Track approximate last access time for remote media
2016-06-29 11:41:20 +01:00
Matthew Hodgson
2460d904bd
fix error checking for new SQL
2016-04-08 19:04:29 +01:00
Matthew Hodgson
fb83f6a1fc
fix SQL based on PR feedback
2016-04-08 18:55:38 +01:00
Matthew Hodgson
8b98a7e8c3
pep8
2016-04-03 12:56:29 +01:00
Matthew Hodgson
7426c86eb8
add a persistent cache of URL lookups, and fix up the in-memory one to work
2016-04-03 00:31:57 +01:00
Mark Haines
7076082ae6
Fix relative imports so they work in both py3 and py27
2016-03-08 11:45:50 +00:00
Matthew Hodgson
6c28ac260c
copyrights
2016-01-07 04:26:29 +00:00
Erik Johnston
dc0c989ef4
Give sensible names for '_simple_...' transactions
2015-03-20 15:59:18 +00:00
Mark Haines
adb04b1e57
Update copyright notices
2015-01-06 13:21:39 +00:00
Mark Haines
e5275d856e
Get the code actually working
2014-12-10 15:46:18 +00:00
Mark Haines
cc84d3ea78
Thumbnail uploaded and cached images
2014-12-10 15:40:52 +00:00
Mark Haines
a953be097f
Add a method field to thumbnail storage
2014-12-05 16:31:56 +00:00
Mark Haines
c01fd5573c
Implement download support for media_repository
2014-12-04 14:22:31 +00:00
Mark Haines
2f804a7072
Fix pyflakes and pep8 warnings
2014-12-02 19:55:18 +00:00
Mark Haines
5da65085d1
Get uploads working with new media repo
2014-12-02 19:51:47 +00:00
Mark Haines
279c48c8b4
Write the upload portion of version 1 of the media repository
2014-12-02 17:13:14 +00:00