From f07ee2145b6ed0d7524aaf12ed6c2b7bda712f2e Mon Sep 17 00:00:00 2001 From: Parker Selbert Date: Fri, 16 Aug 2024 08:13:50 -0500 Subject: [PATCH] Ensure default opts for standard transactions Without default opts each transaction is logged. Many standard operations execute each second, which makes for noisy logs. Now transaction opts are passed as a third argument to ensure defaults are applied. --- lib/oban/repo.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/oban/repo.ex b/lib/oban/repo.ex index 7c19f3d4..3c8c09b7 100644 --- a/lib/oban/repo.ex +++ b/lib/oban/repo.ex @@ -153,7 +153,7 @@ defmodule Oban.Repo do end defp transaction(conf, fun_or_multi, opts, attempt) do - __dispatch__(:transaction, [conf, fun_or_multi, opts]) + __dispatch__(:transaction, [conf, fun_or_multi], opts) rescue error in [DBConnection.ConnectionError, Postgrex.Error] -> opts = Keyword.merge(@retry_opts, opts)