Set database timeout to infinity when trying to detect orphan media

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-11-20 18:30:18 +01:00
parent 07d7f908c9
commit 2b99b48258
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -72,7 +72,7 @@ defmodule Mobilizon.Service.CleanOrphanMedia do
)
query
|> Repo.all()
|> Repo.all(timeout: :infinity)
|> Enum.filter(fn %Media{file: %File{url: url}} ->
is_all_media_orphan?(url, expiration_date)
end)