Include more maintenance tasks

- Asset tasks
- Records on this day email
This commit is contained in:
Claudio Ortolina
2026-03-11 09:31:59 +00:00
parent 97e9cdf6c4
commit 159d5ad695
5 changed files with 244 additions and 4 deletions
+3 -1
View File
@@ -27,8 +27,10 @@ defmodule MusicLibrary.Assets.Cache do
)
end
@one_week_seconds 60 * 60 * 24 * 7
@spec prune(non_neg_integer()) :: non_neg_integer()
def prune(older_than_seconds) do
def prune(older_than_seconds \\ @one_week_seconds) do
threshold =
DateTime.utc_now()
|> DateTime.add(older_than_seconds * -1, :second)