Optimize the repo every day at 4am

This commit is contained in:
Claudio Ortolina
2025-12-15 10:23:54 +03:00
parent 162a38b62e
commit 8e15b6eb57
2 changed files with 13 additions and 1 deletions
+10
View File
@@ -0,0 +1,10 @@
defmodule MusicLibrary.Worker.RepoOptimize do
use Oban.Worker, queue: :heavy_writes, max_attempts: 3
require Logger
@impl Oban.Worker
def perform(_) do
MusicLibrary.Repo.optimize()
end
end