1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Pool do
6 def child_spec(opts) do
9 |> Keyword.put(:worker_module, Pleroma.Pool.Request)
10 |> Keyword.put(:name, {:local, opts[:name]})
11 |> Keyword.put(:size, opts[:size])
12 |> Keyword.put(:max_overflow, opts[:max_overflow])
15 id: opts[:id] || {__MODULE__, make_ref()},
16 start: {:poolboy, :start_link, [poolboy_opts, [name: opts[:name]]]},