Skip to content

Commit

Permalink
Add backblaze note
Browse files Browse the repository at this point in the history
  • Loading branch information
wereii committed Mar 22, 2024
1 parent d83e034 commit 870979a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,20 @@ You should tweak it to fit the performance of your infrastructure.

When there is a lot (10k+) that can be cleaned up you should reduce the `CHECK_INTERVAL` (5-15s) and then
increase `QUERY_LIMIT` (~500) to speed up the process.
Keep in mind the program is intentionally single-threaded so increasing `QUERY_LIMIT` too much will keep the program continually hitting
Keep in mind the program is intentionally single-threaded so increasing `QUERY_LIMIT` too much will keep the program
continually hitting
both pict-rs and postgres for longer.

Once there is less (hundreds) you can increase the `CHECK_INTERVAL` to hours or days as there won't be that much new
thumbnails old enough (but that depends on your traffic).
I would personally expect this to run once or twice a day at that point, with query limit of around the 300.

# Notes

- Backblaze B2 - When the bucket lifecycle is configured to `Keep Only Last Version`, the old versions are not deleted
immediately but hidden instead and deleted after 24h.
So don't be surprised if the bucket size doesn't change immediately.

# Disclaimer

My rust is _rusty_ so there might be some issues with the code.
Expand Down

0 comments on commit 870979a

Please sign in to comment.