-
Notifications
You must be signed in to change notification settings - Fork 1.5k
use redis expire event to delete stored data immediately #536
Conversation
This looks really nice @ehuggett, thank you! I think we should put this feature behind a configuration variable in |
eb635e3
to
07b6f6f
Compare
something like that? (I decided to use the redis_ prefix only to associate it with redis_host, but can change it to whatever) I'm not sure if i should do anything about the following?
related: I deliberately deleted a file (with rm) and got the following error with localForceDelete
looks like trying to delete a non-existent file will eventually become a fatal error? (ie as you implied multiple hosts reacting to the same redis event would trigger multiple attempts to delete the same file) |
Just FYI, If someone is still downloading the file when it expires
Even if downloading does not currently "brake" on expiry when using s3, i would suggest its not something this PR should attempt to address
|
16eaa63
to
d25d68f
Compare
d25d68f
to
58840e2
Compare
When rebasing this I chose to disable deletion upon expiry by default in the config (as you only want it running once, hoping this also makes it easier to merge). |
hey, better late than never, eh @ehuggett? 😉 |
fixes #521 which is now closed, but money saving patches are welcome! Hopefully this will half the amount of storage in use*... I believe its ready for criticism?
The redis server configuration needs to be altered for this to work setting the following appears to be suitable (/the bare minimum?)
notify-keyspace-events "xE"
notify-keyspace-events
is not set correctly, but it does not seem to be harmful? (no errors, but obviously does not delete the file data).edit: *at some points in time