From 2b99b482581739bf584f695f64d4492ca6250c67 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sat, 20 Nov 2021 18:30:18 +0100 Subject: [PATCH] Set database timeout to infinity when trying to detect orphan media Signed-off-by: Thomas Citharel --- lib/service/clean_orphan_media.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/service/clean_orphan_media.ex b/lib/service/clean_orphan_media.ex index b02d2953f..fd619bee2 100644 --- a/lib/service/clean_orphan_media.ex +++ b/lib/service/clean_orphan_media.ex @@ -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)