summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfeld <feld@feld.me>2024-02-23 16:44:53 +0000
committerfeld <feld@feld.me>2024-02-23 16:44:53 +0000
commit6144cb43a8f7def575010652640b6a5cc495569f (patch)
tree448094f924fe1349f29df6b0d0c3faa915d969e2
parent00e828b1a07d8b825eba1b3503651a899400a281 (diff)
parentf4e48bc53ee5ffeb9e7387219c0d46dc33d04521 (diff)
Merge branch 'gun-pool-retry' into 'develop'
Gun connection pooling: rename variable for clarity See merge request pleroma/pleroma!4078
-rw-r--r--changelog.d/gun_pool3.skip0
-rw-r--r--lib/pleroma/gun/connection_pool/worker_supervisor.ex4
2 files changed, 2 insertions, 2 deletions
diff --git a/changelog.d/gun_pool3.skip b/changelog.d/gun_pool3.skip
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/changelog.d/gun_pool3.skip
diff --git a/lib/pleroma/gun/connection_pool/worker_supervisor.ex b/lib/pleroma/gun/connection_pool/worker_supervisor.ex
index edaffcc25..eb83962d8 100644
--- a/lib/pleroma/gun/connection_pool/worker_supervisor.ex
+++ b/lib/pleroma/gun/connection_pool/worker_supervisor.ex
@@ -18,10 +18,10 @@ defmodule Pleroma.Gun.ConnectionPool.WorkerSupervisor do
)
end
- def start_worker(opts, retry \\ false) do
+ def start_worker(opts, last_attempt \\ false) do
case DynamicSupervisor.start_child(__MODULE__, {Pleroma.Gun.ConnectionPool.Worker, opts}) do
{:error, :max_children} ->
- funs = [fn -> retry end, fn -> match?(:error, free_pool()) end]
+ funs = [fn -> last_attempt end, fn -> match?(:error, free_pool()) end]
if Enum.any?(funs, fn fun -> fun.() end) do
:telemetry.execute([:pleroma, :connection_pool, :provision_failure], %{opts: opts})